Merge branch 'main' of https://github.com/grafana/grafana into kristina/affix-attempt-donotmerge
This commit is contained in:
+3
-14
@@ -2752,11 +2752,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
|
||||
[0, 0, 0, "Using localeCompare() can cause performance issues when sorting large datasets. Consider using Intl.Collator for better performance when sorting arrays, or add an eslint-disable comment if sorting a small, known dataset.", "1"]
|
||||
],
|
||||
"public/app/features/teams/CreateTeam.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "2"]
|
||||
],
|
||||
"public/app/features/teams/TeamSettings.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
|
||||
@@ -3501,12 +3496,6 @@ exports[`better eslint`] = {
|
||||
"public/app/plugins/datasource/influxdb/response_parser.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/plugins/datasource/jaeger/_importedDependencies/model/transform-trace-data.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/datasource/jaeger/_importedDependencies/types/index.tsx:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./trace\`)", "0"]
|
||||
],
|
||||
"public/app/plugins/datasource/jaeger/datasource.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
@@ -3933,9 +3922,6 @@ exports[`better eslint`] = {
|
||||
"public/app/plugins/panel/table/table-new/TableCellOptionEditor.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/table/table-new/cells/AutoCellOptionsEditor.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/table/table-new/cells/BarGaugeCellOptionsEditor.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"]
|
||||
@@ -3953,6 +3939,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"]
|
||||
],
|
||||
"public/app/plugins/panel/table/table-new/cells/TextWrapOptionsEditor.tsx:5381": [
|
||||
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/table/table-new/migrations.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
|
||||
@@ -8,7 +8,6 @@ This module returns a Drone configuration including pipelines and secrets.
|
||||
"""
|
||||
|
||||
load("scripts/drone/events/main.star", "main_pipelines")
|
||||
load("scripts/drone/events/pr.star", "pr_pipelines")
|
||||
load(
|
||||
"scripts/drone/events/release.star",
|
||||
"publish_artifacts_pipelines",
|
||||
@@ -28,7 +27,6 @@ load("scripts/drone/vault.star", "secrets")
|
||||
|
||||
def main(_ctx):
|
||||
return (
|
||||
pr_pipelines() +
|
||||
main_pipelines() +
|
||||
rrc_patch_pipelines() +
|
||||
publish_image_pipelines_public() +
|
||||
|
||||
-755
@@ -8,498 +8,6 @@ image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: pr-verify-drone
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.21.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.24.5-alpine
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build verify-drone
|
||||
depends_on:
|
||||
- compile-build-cmd
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: lint-drone
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- '*.md'
|
||||
include:
|
||||
- scripts/drone/**
|
||||
- .drone.yml
|
||||
- .drone.star
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
environment:
|
||||
EDITION: oss
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: pr-verify-starlark
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.21.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go install github.com/bazelbuild/buildtools/buildifier@latest
|
||||
- buildifier --lint=warn -mode=check -r .
|
||||
depends_on: []
|
||||
image: golang:1.24.5-alpine
|
||||
name: lint-starlark
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- '*.md'
|
||||
include:
|
||||
- scripts/drone/**
|
||||
- .drone.star
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
environment:
|
||||
EDITION: oss
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: pr-build-e2e
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $(/usr/bin/github-app-external-token) > /github-app/token
|
||||
environment:
|
||||
GITHUB_APP_ID:
|
||||
from_secret: github-app-app-id
|
||||
GITHUB_APP_INSTALLATION_ID:
|
||||
from_secret: github-app-installation-id
|
||||
GITHUB_APP_PRIVATE_KEY:
|
||||
from_secret: github-app-private-key
|
||||
failure: ignore
|
||||
image: us-docker.pkg.dev/grafanalabs-global/docker-deployment-tools-prod/github-app-secret-writer:2024-11-05-v11688112090.1-83920c59
|
||||
name: github-app-generate-token
|
||||
volumes:
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.21.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.1.2/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.24.5-alpine
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
with its inputs.'
|
||||
- '# The following command will fail if running code generators produces any diff
|
||||
in output.'
|
||||
- apk add --update make
|
||||
- CODEGEN_VERIFY=1 make gen-cue
|
||||
depends_on: []
|
||||
image: golang:1.24.5-alpine
|
||||
name: verify-gen-cue
|
||||
- commands:
|
||||
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
||||
- '# The following command will fail if running code generators produces any diff
|
||||
in output.'
|
||||
- apk add --update make
|
||||
- CODEGEN_VERIFY=1 make gen-jsonnet
|
||||
depends_on: []
|
||||
image: golang:1.24.5-alpine
|
||||
name: verify-gen-jsonnet
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
depends_on: []
|
||||
image: node:22.16.0-alpine
|
||||
name: yarn-install
|
||||
- commands:
|
||||
- apk add --update jq bash
|
||||
- yarn packages:build
|
||||
- yarn packages:pack
|
||||
- ./scripts/validate-npm-packages.sh
|
||||
depends_on:
|
||||
- yarn-install
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: node:22.16.0-alpine
|
||||
name: build-frontend-packages
|
||||
- failure: ignore
|
||||
image: grafana/drone-downstream
|
||||
name: trigger-enterprise-downstream
|
||||
settings:
|
||||
params:
|
||||
- SOURCE_BUILD_NUMBER=${DRONE_COMMIT}
|
||||
- SOURCE_COMMIT=${DRONE_COMMIT}
|
||||
- OSS_PULL_REQUEST=${DRONE_PULL_REQUEST}
|
||||
repositories:
|
||||
- grafana/grafana-enterprise@${DRONE_SOURCE_BRANCH}
|
||||
server: https://drone.grafana.net
|
||||
token:
|
||||
from_secret: drone_token
|
||||
- commands:
|
||||
- wget -qO- https://github.com/dagger/dagger/releases/download/v0.18.8/dagger_v0.18.8_linux_amd64.tar.gz
|
||||
| tar zx -C /bin
|
||||
- apk add docker
|
||||
- docker run --privileged --rm tonistiigi/binfmt:qemu-v7.0.0-28 --version
|
||||
- docker run --privileged --rm tonistiigi/binfmt:qemu-v7.0.0-28 --uninstall 'qemu-*'
|
||||
- docker run --privileged --rm tonistiigi/binfmt:qemu-v7.0.0-28 --install all
|
||||
- go run ./pkg/build/cmd artifacts -a targz:grafana:linux/amd64 -a targz:grafana:linux/arm64
|
||||
-a targz:grafana:linux/arm/v7 -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
|
||||
--ubuntu-base=ubuntu-base --alpine-base=alpine-base --tag-format='{{ .version_base
|
||||
}}-{{ .buildID }}-{{ .arch }}' --ubuntu-tag-format='{{ .version_base }}-{{ .buildID
|
||||
}}-ubuntu-{{ .arch }}' --verify='false' --grafana-dir=$$PWD > packages.txt
|
||||
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
|
||||
depends_on:
|
||||
- yarn-install
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
image: golang:1.24.5-alpine
|
||||
name: rgm-package
|
||||
pull: always
|
||||
volumes:
|
||||
- name: docker
|
||||
path: /var/run/docker.sock
|
||||
- commands:
|
||||
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana
|
||||
depends_on:
|
||||
- rgm-package
|
||||
environment:
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USER:
|
||||
from_secret: docker_username
|
||||
GITHUB_APP_ID: "329617"
|
||||
GITHUB_APP_INSTALLATION_ID: "37346161"
|
||||
GITHUB_APP_PRIVATE_KEY:
|
||||
from_secret: delivery-bot-app-private-key
|
||||
failure: ignore
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: publish-images-grafana
|
||||
volumes:
|
||||
- name: docker
|
||||
path: /var/run/docker.sock
|
||||
- commands:
|
||||
- yarn e2e:plugin:build
|
||||
depends_on:
|
||||
- yarn-install
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: node:22.16.0-alpine
|
||||
name: build-test-plugins
|
||||
- commands:
|
||||
- apk add --update tar bash
|
||||
- mkdir grafana
|
||||
- tar --strip-components=1 -xvf ./dist/*amd64.tar.gz -C grafana
|
||||
- cp -r devenv scripts tools grafana && cd grafana && ./scripts/grafana-server/start-server
|
||||
depends_on:
|
||||
- rgm-package
|
||||
detach: true
|
||||
environment:
|
||||
GF_APP_MODE: development
|
||||
GF_SERVER_HTTP_PORT: "3001"
|
||||
GF_SERVER_ROUTER_LOGGING: "1"
|
||||
image: alpine:3.21.3
|
||||
name: grafana-server
|
||||
- commands:
|
||||
- GITHUB_TOKEN=$(cat /github-app/token)
|
||||
- cd /
|
||||
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- github-app-generate-token
|
||||
environment:
|
||||
AZURE_SP_APP_ID:
|
||||
from_secret: azure_sp_app_id
|
||||
AZURE_SP_PASSWORD:
|
||||
from_secret: azure_sp_app_pw
|
||||
AZURE_TENANT:
|
||||
from_secret: azure_tenant
|
||||
CYPRESS_CI: "true"
|
||||
HOST: grafana-server
|
||||
image: us-docker.pkg.dev/grafanalabs-dev/docker-oss-plugin-partnerships-dev/e2e-14.3.2:1.0.0
|
||||
name: end-to-end-tests-cloud-plugins-suite-azure
|
||||
volumes:
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
when:
|
||||
paths:
|
||||
include:
|
||||
- pkg/tsdb/azuremonitor/**
|
||||
- public/app/plugins/datasource/azuremonitor/**
|
||||
- e2e/cloud-plugins-suite/azure-monitor.spec.ts
|
||||
repo:
|
||||
- grafana/grafana
|
||||
- commands:
|
||||
- npx wait-on@7.0.1 http://$HOST:$PORT
|
||||
- yarn playwright install --with-deps chromium
|
||||
- GRAFANA_URL=http://$HOST:$PORT yarn e2e:playwright --grep @plugins
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
PORT: "3001"
|
||||
PROV_DIR: /grafana/scripts/grafana-server/tmp/conf/provisioning
|
||||
image: node:22-bookworm
|
||||
name: playwright-plugin-e2e
|
||||
- commands:
|
||||
- apt-get update
|
||||
- apt-get install -yq zip
|
||||
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json
|
||||
- gsutil cp -r ./playwright-report/. gs://releng-pipeline-artifacts-dev/${DRONE_BUILD_NUMBER}/playwright-report
|
||||
- export E2E_PLAYWRIGHT_REPORT_URL=https://storage.googleapis.com/releng-pipeline-artifacts-dev/${DRONE_BUILD_NUMBER}/playwright-report/index.html
|
||||
- "echo \"E2E Playwright report uploaded to: \n $${E2E_PLAYWRIGHT_REPORT_URL}\""
|
||||
depends_on:
|
||||
- playwright-plugin-e2e
|
||||
environment:
|
||||
GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY:
|
||||
from_secret: gcp_upload_artifacts_key
|
||||
failure: ignore
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: playwright-e2e-report-upload
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- commands:
|
||||
- GITHUB_TOKEN=$(cat /github-app/token)
|
||||
- if [ ! -d ./playwright-report/trace ]; then echo 'all tests passed'; exit 0; fi
|
||||
- export E2E_PLAYWRIGHT_REPORT_URL=https://storage.googleapis.com/releng-pipeline-artifacts-dev/${DRONE_BUILD_NUMBER}/playwright-report/index.html
|
||||
- 'curl -L -X POST https://api.github.com/repos/grafana/grafana/issues/${DRONE_PULL_REQUEST}/comments
|
||||
-H "Accept: application/vnd.github+json" -H "Authorization: Bearer $${GITHUB_TOKEN}"
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" -d "{\"body\":\"❌ Failed to run Playwright
|
||||
plugin e2e tests. <br /> <br /> Click [here]($${E2E_PLAYWRIGHT_REPORT_URL}) to
|
||||
browse the Playwright report and trace viewer. <br /> For information on how to
|
||||
run Playwright tests locally, refer to the [Developer guide](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#to-run-the-playwright-tests).
|
||||
\"}"'
|
||||
depends_on:
|
||||
- playwright-e2e-report-upload
|
||||
- github-app-generate-token
|
||||
failure: ignore
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: playwright-e2e-report-post-link
|
||||
volumes:
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- commands:
|
||||
- export GITHUB_TOKEN=$(cat /github-app/token)
|
||||
- if [ -z `find ./e2e -type f -name *spec.ts.mp4` ]; then echo 'no e2e videos found
|
||||
from remaining tests'; exit 0; fi
|
||||
- apt-get update
|
||||
- apt-get install -yq zip
|
||||
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json
|
||||
- find ./e2e -type f -name "*spec.ts.mp4" | zip e2e/videos.zip -@
|
||||
- gsutil cp e2e/videos.zip gs://$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
|
||||
- export E2E_ARTIFACTS_VIDEO_ZIP=https://storage.googleapis.com/$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
|
||||
- 'echo "E2E Test artifacts uploaded to: $${E2E_ARTIFACTS_VIDEO_ZIP}"'
|
||||
- 'curl -X POST https://api.github.com/repos/${DRONE_REPO}/statuses/${DRONE_COMMIT_SHA}
|
||||
-H "Authorization: token $${GITHUB_TOKEN}" -d "{\"state\":\"success\",\"target_url\":\"$${E2E_ARTIFACTS_VIDEO_ZIP}\",
|
||||
\"description\": \"Click on the details to download e2e recording videos\", \"context\":
|
||||
\"e2e_artifacts\"}"'
|
||||
depends_on:
|
||||
- end-to-end-tests-cloud-plugins-suite-azure
|
||||
- playwright-plugin-e2e
|
||||
- github-app-generate-token
|
||||
environment:
|
||||
E2E_TEST_ARTIFACTS_BUCKET: releng-pipeline-artifacts-dev
|
||||
GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY:
|
||||
from_secret: gcp_upload_artifacts_key
|
||||
failure: ignore
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: e2e-tests-artifacts-upload
|
||||
volumes:
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- commands:
|
||||
- yarn storybook:build
|
||||
- ./bin/build verify-storybook
|
||||
depends_on:
|
||||
- rgm-package
|
||||
- build-frontend-packages
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
image: node:22.16.0-alpine
|
||||
name: build-storybook
|
||||
when:
|
||||
paths:
|
||||
include:
|
||||
- packages/grafana-ui/**
|
||||
- commands:
|
||||
- npx wait-on@7.0.1 http://$HOST:$PORT
|
||||
- pa11y-ci --config e2e/pa11yci.conf.js
|
||||
depends_on:
|
||||
- grafana-server
|
||||
environment:
|
||||
GRAFANA_MISC_STATS_API_KEY:
|
||||
from_secret: grafana_misc_stats_api_key
|
||||
HOST: grafana-server
|
||||
NO_THRESHOLDS: "false"
|
||||
PORT: 3001
|
||||
failure: always
|
||||
image: grafana/docker-puppeteer:1.1.0
|
||||
name: test-a11y-frontend
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- '*.md'
|
||||
- docs/**
|
||||
- latest.json
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
- name: github-app
|
||||
temp: {}
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
environment:
|
||||
EDITION: oss
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: pr-docs
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.21.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
depends_on: []
|
||||
image: node:22.16.0-alpine
|
||||
name: yarn-install
|
||||
- commands:
|
||||
- yarn run prettier:checkDocs
|
||||
depends_on:
|
||||
- yarn-install
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: node:22.16.0-alpine
|
||||
name: lint-docs
|
||||
- commands:
|
||||
- mkdir -p /hugo/content/docs/grafana/latest
|
||||
- 'echo -e ''---\nredirectURL: /docs/grafana/latest/\ntype: redirect\nversioned:
|
||||
true\n---\n'' > /hugo/content/docs/grafana/_index.md'
|
||||
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
|
||||
- cd /hugo && make prod
|
||||
image: grafana/docs-base:latest
|
||||
name: build-docs-website
|
||||
pull: always
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
with its inputs.'
|
||||
- '# The following command will fail if running code generators produces any diff
|
||||
in output.'
|
||||
- apk add --update make
|
||||
- CODEGEN_VERIFY=1 make gen-cue
|
||||
depends_on: []
|
||||
image: golang:1.24.5-alpine
|
||||
name: verify-gen-cue
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
include:
|
||||
- '*.md'
|
||||
- docs/**
|
||||
- packages/**/*.md
|
||||
- latest.json
|
||||
repo:
|
||||
- grafana/grafana
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
environment:
|
||||
EDITION: oss
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: main-docs
|
||||
node:
|
||||
type: no-parallel
|
||||
@@ -2049,264 +1557,6 @@ image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: rgm-nightly-build
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- wget -qO- https://github.com/dagger/dagger/releases/download/v0.18.8/dagger_v0.18.8_linux_amd64.tar.gz
|
||||
| tar zx -C /bin
|
||||
- apk add docker
|
||||
- export GRAFANA_DIR=$$(pwd)
|
||||
- export GITHUB_TOKEN=$(cat /github-app/token)
|
||||
- ./pkg/build/daggerbuild/scripts/drone_build_nightly_grafana.sh
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.21.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
from_secret: destination
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOWNLOADS_DESTINATION:
|
||||
from_secret: rgm_downloads_destination
|
||||
GCOM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
GCP_KEY_BASE64:
|
||||
from_secret: gcp_key_base64
|
||||
GPG_PASSPHRASE:
|
||||
from_secret: packages_gpg_passphrase
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: packages_gpg_private_key
|
||||
GPG_PUBLIC_KEY:
|
||||
from_secret: packages_gpg_public_key
|
||||
NPM_TOKEN:
|
||||
from_secret: npm_token
|
||||
STORYBOOK_DESTINATION:
|
||||
from_secret: rgm_storybook_destination
|
||||
UBUNTU_BASE: ubuntu:22.04
|
||||
image: golang:1.24.5-alpine
|
||||
name: rgm-build
|
||||
pull: always
|
||||
volumes:
|
||||
- name: docker
|
||||
path: /var/run/docker.sock
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
- commands:
|
||||
- mkdir -p $${DESTINATION}/$${DRONE_BUILD_EVENT}
|
||||
- printenv GCP_KEY_BASE64 | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- gcloud storage cp -r $${DRONE_WORKSPACE}/dist/* $${DESTINATION}/$${DRONE_BUILD_EVENT}
|
||||
depends_on:
|
||||
- rgm-build
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
from_secret: destination
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOWNLOADS_DESTINATION:
|
||||
from_secret: rgm_downloads_destination
|
||||
GCOM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
GCP_KEY_BASE64:
|
||||
from_secret: gcp_key_base64
|
||||
GPG_PASSPHRASE:
|
||||
from_secret: packages_gpg_passphrase
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: packages_gpg_private_key
|
||||
GPG_PUBLIC_KEY:
|
||||
from_secret: packages_gpg_public_key
|
||||
NPM_TOKEN:
|
||||
from_secret: npm_token
|
||||
STORYBOOK_DESTINATION:
|
||||
from_secret: rgm_storybook_destination
|
||||
image: google/cloud-sdk:alpine
|
||||
name: rgm-copy
|
||||
trigger:
|
||||
cron:
|
||||
include:
|
||||
- nightly-release
|
||||
event:
|
||||
include:
|
||||
- cron
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on:
|
||||
- rgm-nightly-build
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: rgm-nightly-publish
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p $${DRONE_WORKSPACE}/dist
|
||||
- printenv GCP_KEY_BASE64 | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- gcloud storage cp -r $${DESTINATION}/$${DRONE_BUILD_EVENT}/*_$${DRONE_BUILD_NUMBER}_*
|
||||
$${DRONE_WORKSPACE}/dist
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
from_secret: destination
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOWNLOADS_DESTINATION:
|
||||
from_secret: rgm_downloads_destination
|
||||
GCOM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
GCP_KEY_BASE64:
|
||||
from_secret: gcp_key_base64
|
||||
GPG_PASSPHRASE:
|
||||
from_secret: packages_gpg_passphrase
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: packages_gpg_private_key
|
||||
GPG_PUBLIC_KEY:
|
||||
from_secret: packages_gpg_public_key
|
||||
NPM_TOKEN:
|
||||
from_secret: npm_token
|
||||
STORYBOOK_DESTINATION:
|
||||
from_secret: rgm_storybook_destination
|
||||
image: google/cloud-sdk:alpine
|
||||
name: rgm-copy
|
||||
- commands:
|
||||
- wget -qO- https://github.com/dagger/dagger/releases/download/v0.18.8/dagger_v0.18.8_linux_amd64.tar.gz
|
||||
| tar zx -C /bin
|
||||
- apk add docker
|
||||
- export GRAFANA_DIR=$$(pwd)
|
||||
- export GITHUB_TOKEN=$(cat /github-app/token)
|
||||
- ./pkg/build/daggerbuild/scripts/drone_publish_nightly_grafana.sh
|
||||
depends_on:
|
||||
- rgm-copy
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.21.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
from_secret: destination
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOWNLOADS_DESTINATION:
|
||||
from_secret: rgm_downloads_destination
|
||||
GCOM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
GCP_KEY_BASE64:
|
||||
from_secret: gcp_key_base64
|
||||
GPG_PASSPHRASE:
|
||||
from_secret: packages_gpg_passphrase
|
||||
GPG_PRIVATE_KEY:
|
||||
from_secret: packages_gpg_private_key
|
||||
GPG_PUBLIC_KEY:
|
||||
from_secret: packages_gpg_public_key
|
||||
NPM_TOKEN:
|
||||
from_secret: npm_token
|
||||
STORYBOOK_DESTINATION:
|
||||
from_secret: rgm_storybook_destination
|
||||
UBUNTU_BASE: ubuntu:22.04
|
||||
image: golang:1.24.5-alpine
|
||||
name: rgm-publish
|
||||
pull: always
|
||||
volumes:
|
||||
- name: docker
|
||||
path: /var/run/docker.sock
|
||||
- name: github-app
|
||||
path: /github-app
|
||||
- depends_on:
|
||||
- rgm-publish
|
||||
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
||||
name: publish-deb
|
||||
privileged: true
|
||||
settings:
|
||||
access_key_id:
|
||||
from_secret: packages_access_key_id
|
||||
gpg_passphrase:
|
||||
from_secret: packages_gpg_passphrase
|
||||
gpg_private_key:
|
||||
from_secret: packages_gpg_private_key
|
||||
gpg_public_key:
|
||||
from_secret: packages_gpg_public_key
|
||||
package_path: file:///drone/src/dist/*.deb
|
||||
secret_access_key:
|
||||
from_secret: packages_secret_access_key
|
||||
service_account_json:
|
||||
from_secret: packages_service_account
|
||||
target_bucket: grafana-packages
|
||||
- depends_on:
|
||||
- rgm-publish
|
||||
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
||||
name: publish-rpm
|
||||
privileged: true
|
||||
settings:
|
||||
access_key_id:
|
||||
from_secret: packages_access_key_id
|
||||
gpg_passphrase:
|
||||
from_secret: packages_gpg_passphrase
|
||||
gpg_private_key:
|
||||
from_secret: packages_gpg_private_key
|
||||
gpg_public_key:
|
||||
from_secret: packages_gpg_public_key
|
||||
package_path: file:///drone/src/dist/*.rpm
|
||||
secret_access_key:
|
||||
from_secret: packages_secret_access_key
|
||||
service_account_json:
|
||||
from_secret: packages_service_account
|
||||
target_bucket: grafana-packages
|
||||
trigger:
|
||||
cron:
|
||||
include:
|
||||
- nightly-release
|
||||
event:
|
||||
include:
|
||||
- cron
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: rgm-promotion
|
||||
node:
|
||||
type: no-parallel
|
||||
@@ -2623,8 +1873,3 @@ get:
|
||||
path: secret/data/common/gcr
|
||||
kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: aef043aae7394d3160a7147c8b57599bf1a2f4ba5c596ffb795a0e6a049c73a6
|
||||
|
||||
...
|
||||
|
||||
@@ -72,9 +72,12 @@
|
||||
/hack/ @grafana/grafana-app-platform-squad
|
||||
/.air.toml @macabu
|
||||
|
||||
# Git Sync / App Platform Provisioning
|
||||
/pkg/apis/provisioning @grafana/grafana-git-ui-sync-team
|
||||
/public/app/features/provisioning @grafana/grafana-git-ui-sync-team
|
||||
/pkg/registry/apis/provisioning @grafana/grafana-git-ui-sync-team
|
||||
/pkg/tests/apis/provisioning @grafana/grafana-git-ui-sync-team
|
||||
# Git Sync frontend owned by frontent team as a whole.
|
||||
|
||||
/apps/alerting/ @grafana/alerting-backend
|
||||
/apps/dashboard/ @grafana/grafana-app-platform-squad @grafana/dashboards-squad
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Build swagger
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
|
||||
with:
|
||||
"go-version-file": "go.mod"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
# Explicitly set Go version to 1.24.1 to ensure consistent OpenAPI spec generation
|
||||
# The crypto/x509 package has additional fields in Go 1.24.1 that affect the generated specs
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Run unit tests
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Setup Enterprise
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
|
||||
- if: matrix.language == 'go'
|
||||
name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
echo "has_backend=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Setup golang environment
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
if: steps.check_backend.outputs.has_backend == 'true'
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-go@v5
|
||||
- uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: ./go.mod
|
||||
- name: golangci-lint
|
||||
|
||||
@@ -88,7 +88,6 @@ jobs:
|
||||
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
|
||||
permission-members: read
|
||||
permission-issues: write
|
||||
|
||||
- name: Check if member of grafana org
|
||||
id: check-if-grafana-org-member
|
||||
continue-on-error: true
|
||||
@@ -96,6 +95,13 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
ACTOR: ${{ github.actor }}
|
||||
- name: Checkout
|
||||
if: steps.check-if-grafana-org-member.outputs.is_grafana_org_member != 'true' && github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
|
||||
uses: actions/checkout@v4 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
.github/workflows/auto-triager
|
||||
- name: Send issue to the auto triager action
|
||||
id: auto_triage
|
||||
if: steps.check-if-grafana-org-member.outputs.is_grafana_org_member != 'true' && github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -44,8 +44,6 @@ jobs:
|
||||
runs-on: ubuntu-latest-16-cores
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
artifact: ${{ steps.artifact.outputs.artifact }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -57,7 +55,7 @@ jobs:
|
||||
- uses: actions/cache@v4
|
||||
id: cache
|
||||
with:
|
||||
key: "build-grafana-${{ runner.os }}-${{ hashFiles('yarn.lock', 'public/*', 'packages/*', 'pkg/**/*.go', '**/go.mod', '**/go.sum', '!**_test.go', '!**.test.ts', '!**.test.tsx') }}"
|
||||
key: "build-grafana-${{ runner.os }}-${{ hashFiles('yarn.lock', 'public/*', 'packages/*', 'pkg/**/*.go', '**/go.mod', '**/go.sum', '!**_test.go', '!**.test.ts', '!**.test.tsx', 'Dockerfile') }}"
|
||||
path: |
|
||||
build-dir
|
||||
|
||||
@@ -67,15 +65,16 @@ jobs:
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
verb: run
|
||||
args: go run ./pkg/build/cmd artifacts -a targz:grafana:linux/amd64 --grafana-dir="${PWD}" > out.txt
|
||||
args: go run ./pkg/build/cmd artifacts -a targz:grafana:linux/amd64 -a docker:grafana:linux/amd64 --grafana-dir="${PWD}" > out.txt
|
||||
- name: Cat built artifact
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: cat out.txt
|
||||
- name: Move built artifact
|
||||
- name: Move built artifacts
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p build-dir
|
||||
mv "$(cat out.txt)" build-dir/grafana.tar.gz
|
||||
mv "$(grep 'grafana_.*tar.gz$' out.txt | grep -Fv -m1 'docker')" build-dir/grafana.tar.gz
|
||||
mv "$(grep 'grafana_.*docker.tar.gz$' out.txt)" build-dir/grafana.docker.tar.gz
|
||||
|
||||
# If cache hit, validate the artifact is present
|
||||
- name: Validate artifact
|
||||
@@ -90,14 +89,20 @@ jobs:
|
||||
run: echo "artifact=grafana-server-${{github.run_number}}" >> "$GITHUB_OUTPUT"
|
||||
id: artifact
|
||||
|
||||
- name: Upload artifact
|
||||
- name: Upload grafana.tar.gz
|
||||
uses: actions/upload-artifact@v4
|
||||
id: upload
|
||||
with:
|
||||
retention-days: 1
|
||||
name: ${{ steps.artifact.outputs.artifact }}
|
||||
name: grafana-tar-gz
|
||||
path: build-dir/grafana.tar.gz
|
||||
|
||||
- name: Upload grafana docker tarball
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 1
|
||||
name: grafana-docker-tar-gz
|
||||
path: build-dir/grafana.docker.tar.gz
|
||||
|
||||
# TODO: we won't need this when we only have playwright
|
||||
build-e2e-runner:
|
||||
needs: detect-changes
|
||||
@@ -113,7 +118,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
@@ -131,6 +136,66 @@ jobs:
|
||||
name: ${{ steps.artifact.outputs.artifact }}
|
||||
path: e2e-runner
|
||||
|
||||
push-docker-image:
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-grafana
|
||||
steps:
|
||||
- id: vault-secrets
|
||||
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
||||
with:
|
||||
repo_secrets: |
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM=delivery-bot-app:PRIVATE_KEY
|
||||
- name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
with:
|
||||
app_id: ${{ vars.DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ env.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
repositories: '["grafana"]'
|
||||
permissions: '{"checks": "write"}'
|
||||
- uses: grafana/shared-workflows/actions/login-to-gar@main
|
||||
id: login-to-gar
|
||||
with:
|
||||
registry: 'us-docker.pkg.dev'
|
||||
environment: 'dev'
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||
with:
|
||||
name: grafana-docker-tar-gz
|
||||
path: .
|
||||
- name: Load & Push Docker image
|
||||
env:
|
||||
BUILD_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
LOADED_IMAGE_NAME=$(docker load -i grafana.docker.tar.gz | sed 's/Loaded image: //g')
|
||||
VERSION=$(echo "${LOADED_IMAGE_NAME}" | cut -d ':' -f 2 | cut -d '-' -f 1)
|
||||
DOCKER_IMAGE="us-docker.pkg.dev/grafanalabs-dev/docker-grafana-dev/grafana:${VERSION}-${BUILD_ID}"
|
||||
docker tag "${LOADED_IMAGE_NAME}" "${DOCKER_IMAGE}"
|
||||
docker push "${DOCKER_IMAGE}"
|
||||
echo "IMAGE=${DOCKER_IMAGE}" >> "$GITHUB_ENV"
|
||||
- name: Add PR status check
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
SHA: ${{ github.event.pull_request.head.sha }}
|
||||
run: |
|
||||
gh api \
|
||||
--method POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
/repos/grafana/grafana/check-runs \
|
||||
-f "name=${IMAGE}" \
|
||||
-f "head_sha=${SHA}" \
|
||||
-f 'status=completed' \
|
||||
-f 'conclusion=neutral' \
|
||||
-f 'output[title]=Docker image' \
|
||||
-f "output[summary]=${IMAGE}" \
|
||||
-f "output[text]=${IMAGE}"
|
||||
|
||||
run-e2e-tests:
|
||||
needs:
|
||||
- build-grafana
|
||||
@@ -166,7 +231,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.build-grafana.outputs.artifact }}
|
||||
name: grafana-tar-gz
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.build-e2e-runner.outputs.artifact }}
|
||||
@@ -242,7 +307,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.build-grafana.outputs.artifact }}
|
||||
name: grafana-tar-gz
|
||||
- name: Run E2E tests
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
@@ -354,7 +419,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.build-grafana.outputs.artifact }}
|
||||
name: grafana-tar-gz
|
||||
- name: Run PR a11y test
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
cache: false
|
||||
go-version-file: go.mod
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
cache: false
|
||||
go-version-file: go.mod
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639"
|
||||
uses: "actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639"
|
||||
uses: "actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
name: Build Release Packages
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
source-event:
|
||||
description: If this workflow was triggered by another workflow, this value should be set to the GITHUB_EVENT_NAME of that source workflow.
|
||||
type: string
|
||||
required: false
|
||||
default: workflow_dispatch
|
||||
schedule:
|
||||
# Every weeknight at midnight
|
||||
# "Scheduled workflows will only run on the default branch." (docs.github.com)
|
||||
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- uses: actions/setup-go@v5
|
||||
- uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Configure git user
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Pin Go version to mod file
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
- name: Install Cypress dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c
|
||||
with:
|
||||
runTests: false
|
||||
- name: Cache Grafana Build and Dependencies
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Pin Go version to mod file
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- run: go version
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Build grafana
|
||||
run: make build
|
||||
- name: Install Cypress dependencies
|
||||
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c
|
||||
with:
|
||||
runTests: false
|
||||
- name: Run dashboard scenes e2e
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v5.5.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Setup Enterprise
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639"
|
||||
uses: "actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
yarn start
|
||||
|
||||
.PHONY: run-bra
|
||||
run-air: ## [Deprecated] Build and run web server on filesystem changes. See /.bra.toml for configuration.
|
||||
run-bra: ## [Deprecated] Build and run web server on filesystem changes. See /.bra.toml for configuration.
|
||||
$(bra) run
|
||||
|
||||
.PHONY: frontend-service-check
|
||||
@@ -483,7 +483,7 @@ protobuf: ## Compile protobuf definitions
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.5
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
|
||||
buf generate pkg/plugins/backendplugin/pluginextensionv2 --template pkg/plugins/backendplugin/pluginextensionv2/buf.gen.yaml
|
||||
buf generate apps/secret/decrypt/v1beta1 --template apps/secret/decrypt/v1beta1/buf.gen.yaml
|
||||
buf generate apps/secret --template apps/secret/buf.gen.yaml
|
||||
buf generate pkg/storage/unified/proto --template pkg/storage/unified/proto/buf.gen.yaml
|
||||
buf generate pkg/services/authz/proto/v1 --template pkg/services/authz/proto/v1/buf.gen.yaml
|
||||
buf generate pkg/services/ngalert/store/proto/v1 --template pkg/services/ngalert/store/proto/v1/buf.gen.yaml
|
||||
|
||||
+10
-3
@@ -7,8 +7,8 @@ require (
|
||||
github.com/google/go-github/v70 v70.0.0
|
||||
github.com/grafana/authlib/types v0.0.0-20250710201142-9542f2f28d43
|
||||
github.com/grafana/grafana v0.0.0-00010101000000-000000000000
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250725144121-b1592b5e36d2
|
||||
github.com/stretchr/testify v1.10.0
|
||||
@@ -79,6 +79,7 @@ require (
|
||||
github.com/dolthub/go-mysql-server v0.19.1-0.20250410182021-5632d67cd46e // indirect
|
||||
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 // indirect
|
||||
github.com/dolthub/vitess v0.0.0-20250410090211-143e6b272ad4 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/elazarl/goproxy v1.7.2 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
@@ -125,7 +126,7 @@ require (
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/google/wire v0.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b // indirect
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263 // indirect
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43 // indirect
|
||||
github.com/grafana/dataplane/sdata v0.0.9 // indirect
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914 // indirect
|
||||
@@ -190,6 +191,7 @@ require (
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/nikunjy/rules v1.5.0 // indirect
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
|
||||
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
|
||||
@@ -213,6 +215,7 @@ require (
|
||||
github.com/prometheus/exporter-toolkit v0.14.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rs/cors v1.11.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
@@ -284,6 +287,10 @@ require (
|
||||
k8s.io/component-base v0.33.3 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
|
||||
modernc.org/libc v1.65.0 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.10.0 // indirect
|
||||
modernc.org/sqlite v1.37.0 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
|
||||
|
||||
+38
-10
@@ -651,8 +651,8 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
|
||||
github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b h1:mfUAq/N+mS82EcE35hDXWtfVY7UhTjzZxzssvFt9tvQ=
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b/go.mod h1:VKxaR93Gff0ZlO2sPcdPVob1a/UzArFEW5zx3Bpyhls=
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263 h1:hcr/AmPB0KL4H+gCEFIdKUnkihTxGAkAOiZA7GDYoL8=
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263/go.mod h1:VKxaR93Gff0ZlO2sPcdPVob1a/UzArFEW5zx3Bpyhls=
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43 h1:vVPT0i5Y1vI6qzecYStV2yk7cHKrC3Pc7AgvwT5KydQ=
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43/go.mod h1:1fWkOiL+m32NBgRHZtlZGz2ji868tPZACYbqP3nBRJI=
|
||||
github.com/grafana/authlib/types v0.0.0-20250710201142-9542f2f28d43 h1:NlkGMnVi/oUn6Cr90QbJYpQJ4FnjyAIG9Ex5GtTZIzw=
|
||||
@@ -663,22 +663,22 @@ github.com/grafana/dataplane/sdata v0.0.9 h1:AGL1LZnCUG4MnQtnWpBPbQ8ZpptaZs14w6k
|
||||
github.com/grafana/dataplane/sdata v0.0.9/go.mod h1:Jvs5ddpGmn6vcxT7tCTWAZ1mgi4sbcdFt9utQx5uMAU=
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914 h1:qcSGhr691f1mmPHwg2svGyO40Ex92G02aOyHzP6XHCE=
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914/go.mod h1:OiN4P4aC6LwLzLbEupH3Ue83VfQoNMfG48rsna8jI/E=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-aws-sdk v1.0.4 h1:D14UAehsOqpjliHmHzveRQ1p43KCsMzdmb7GovWj+SY=
|
||||
github.com/grafana/grafana-aws-sdk v1.0.4/go.mod h1:hO7q7yWV+t6dmiyJjMa3IbuYnYkBua+G/IAlOPVIYKE=
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0 h1:0TYrkzAc3u0HX+9GK86cGrLTUAcmQfl3/LEB3tL+SOA=
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0/go.mod h1:H9sVh9A4yg5egMGZeh0mifxT1Q/uqwKe1LBjBJU6pN8=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0 h1:5/rIYparLi02pofdaag8wnjspMMVNCi8cZhC4cdC3Ho=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0/go.mod h1:+8NXT/XUJ/89GV6FxGQ366NZ3nU+cAXDMd0OUESF9H4=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250716132114-6fd75ebc5441 h1:+TSbaxCXBZrKkdROWBzdWna8uStE1f9LYd7GiqjVfz8=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250716132114-6fd75ebc5441/go.mod h1:1XWiRSVuDQiayapHhQiDc4S4e9GzEZgg/3GeNCuDgn4=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250730164619-34019e5ec017 h1:Niy+KRDWHsUVqfhZQg0oZbAQFO6QcO6a4l9V/ouDEEs=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250730164619-34019e5ec017/go.mod h1:/iuseD/cEpXDiy7MpL+4qBFZ3H6esnUJTYzpoJMw9dw=
|
||||
github.com/grafana/grafana/apps/folder v0.0.0-20250627191313-2f1a6ae1712b h1:31MwoIKKT9Ay0ZjbT4lkfcPijiWogUWzXs2EjrCgodI=
|
||||
github.com/grafana/grafana/apps/folder v0.0.0-20250627191313-2f1a6ae1712b/go.mod h1:dLtYBp1pza5HYalezNvzlP8JDeKrZ5BKTonDgEOE0NY=
|
||||
github.com/grafana/grafana/apps/secret v0.0.0-20250711114246-c9b2126c4ad5 h1:+fMhUoqwGdY8ntH0GL2icJa3uk+bTiIMicawDG2r9Uc=
|
||||
github.com/grafana/grafana/apps/secret v0.0.0-20250711114246-c9b2126c4ad5/go.mod h1:TIrKvhgo2j6lvVeOZ3TUmXbI4I48d6v7QcadL/f6SKQ=
|
||||
github.com/grafana/grafana/apps/secret v0.0.0-20250731151929-0aac22a9e2d3 h1:16eaVEucbwis3TxS4CYZxxg5wfPAP/6u7Ji2+wbiHyk=
|
||||
github.com/grafana/grafana/apps/secret v0.0.0-20250731151929-0aac22a9e2d3/go.mod h1:pS2M5ILsHx9VNTM96glLtCjCVXHWyfGcT34WHvbbMtM=
|
||||
github.com/grafana/grafana/pkg/aggregator v0.0.0-20250627191313-2f1a6ae1712b h1:ei01IFqmnXkOrrVvsT3CYe+i5xYra3SCX7Wsu3PMsDU=
|
||||
github.com/grafana/grafana/pkg/aggregator v0.0.0-20250627191313-2f1a6ae1712b/go.mod h1:+H4Va9jDJlGQJjAN+OFD/hLx2I/yEzDRMQLaKecvgAc=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250725144121-b1592b5e36d2 h1:lvmcK9XOJUJiYhl2kH4nwAKOUdq+ug+ueIGqfKlip3E=
|
||||
@@ -944,6 +944,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/nikunjy/rules v1.5.0 h1:KJDSLOsFhwt7kcXUyZqwkgrQg5YoUwj+TVu6ItCQShw=
|
||||
github.com/nikunjy/rules v1.5.0/go.mod h1:TlZtZdBChrkqi8Lr2AXocme8Z7EsbxtFdDoKeI6neBQ=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
@@ -1056,6 +1058,8 @@ github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2z
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI=
|
||||
github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
@@ -1910,6 +1914,30 @@ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUy
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0=
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
modernc.org/cc/v4 v4.26.0 h1:QMYvbVduUGH0rrO+5mqF/PSPPRZNpRtg2CLELy7vUpA=
|
||||
modernc.org/cc/v4 v4.26.0/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
|
||||
modernc.org/ccgo/v4 v4.26.0 h1:gVzXaDzGeBYJ2uXTOpR8FR7OlksDOe9jxnjhIKCsiTc=
|
||||
modernc.org/ccgo/v4 v4.26.0/go.mod h1:Sem8f7TFUtVXkG2fiaChQtyyfkqhJBg/zjEJBkmuAVY=
|
||||
modernc.org/fileutil v1.3.1 h1:8vq5fe7jdtEvoCf3Zf9Nm0Q05sH6kGx0Op2CPx1wTC8=
|
||||
modernc.org/fileutil v1.3.1/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
|
||||
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
|
||||
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
|
||||
modernc.org/libc v1.65.0 h1:e183gLDnAp9VJh6gWKdTy0CThL9Pt7MfcR/0bgb7Y1Y=
|
||||
modernc.org/libc v1.65.0/go.mod h1:7m9VzGq7APssBTydds2zBcxGREwvIGpuUBaKTXdm2Qs=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4=
|
||||
modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
|
||||
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
|
||||
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
|
||||
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
|
||||
modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI=
|
||||
modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
|
||||
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
|
||||
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
||||
@@ -3,8 +3,8 @@ module github.com/grafana/grafana/apps/alerting/notifications
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1
|
||||
k8s.io/apimachinery v0.33.3
|
||||
k8s.io/apiserver v0.33.3
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
|
||||
|
||||
@@ -84,10 +84,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.1-0.20191002090509-6af20e3a5340 h1:uGoIog/wiQHI9GAxXO5TJbT0wWKH3O9HhOJW1F9c3fY=
|
||||
|
||||
@@ -4,7 +4,7 @@ go 1.24.5
|
||||
|
||||
require (
|
||||
cuelang.org/go v0.11.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
|
||||
github.com/stretchr/testify v1.10.0
|
||||
@@ -44,7 +44,7 @@ require (
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/grafana/otel-profiling-go v0.5.1 // indirect
|
||||
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
|
||||
|
||||
@@ -94,10 +94,10 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0 h1:5/rIYparLi02pofdaag8wnjspMMVNCi8cZhC4cdC3Ho=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0/go.mod h1:+8NXT/XUJ/89GV6FxGQ366NZ3nU+cAXDMd0OUESF9H4=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e h1:BTKk7LHuG1kmAkucwTA7DuMbKpKvJTKrGdBmUNO4dfQ=
|
||||
|
||||
@@ -294,8 +294,6 @@ var _ resource.ListObject = &DashboardList{}
|
||||
|
||||
// Copy methods for all subresource types
|
||||
|
||||
|
||||
|
||||
// DeepCopy creates a full deep copy of DashboardStatus
|
||||
func (s *DashboardStatus) DeepCopy() *DashboardStatus {
|
||||
cpy := &DashboardStatus{}
|
||||
|
||||
@@ -294,8 +294,6 @@ var _ resource.ListObject = &DashboardList{}
|
||||
|
||||
// Copy methods for all subresource types
|
||||
|
||||
|
||||
|
||||
// DeepCopy creates a full deep copy of DashboardStatus
|
||||
func (s *DashboardStatus) DeepCopy() *DashboardStatus {
|
||||
cpy := &DashboardStatus{}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "v2beta1",
|
||||
"apiVersion": "dashboard.grafana.app/v2beta1",
|
||||
"metadata": {
|
||||
"name": "test-v2alpha1-complete",
|
||||
"creationTimestamp": null,
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "v2beta1",
|
||||
"apiVersion": "dashboard.grafana.app/v2beta1",
|
||||
"metadata": {
|
||||
"name": "test-v2alpha1-annotations",
|
||||
"creationTimestamp": null
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "v2beta1",
|
||||
"apiVersion": "dashboard.grafana.app/v2beta1",
|
||||
"metadata": {
|
||||
"name": "test-v2alpha1-groupby-adhoc-vars",
|
||||
"creationTimestamp": null
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "v2beta1",
|
||||
"apiVersion": "dashboard.grafana.app/v2beta1",
|
||||
"metadata": {
|
||||
"name": "test-v2alpha1-viz-config",
|
||||
"creationTimestamp": null
|
||||
|
||||
@@ -39,7 +39,7 @@ import (
|
||||
|
||||
func ConvertDashboard_V2alpha1_to_V2beta1(in *dashv2alpha1.Dashboard, out *dashv2beta1.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.APIVersion = dashv2beta1.VERSION
|
||||
out.APIVersion = dashv2beta1.APIVERSION
|
||||
out.Kind = in.Kind
|
||||
|
||||
return convertDashboardSpec_V2alpha1_to_V2beta1(&in.Spec, &out.Spec, scope)
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ module github.com/grafana/grafana/apps/folder
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
|
||||
k8s.io/apimachinery v0.33.3
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
|
||||
@@ -23,7 +23,7 @@ require (
|
||||
github.com/go-test/deep v1.1.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
|
||||
+4
-4
@@ -32,10 +32,10 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e h1:BTKk7LHuG1kmAkucwTA7DuMbKpKvJTKrGdBmUNO4dfQ=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e/go.mod h1:IA4SOwun8QyST9c5UNs/fN37XL6boXXDvRYFcFwbipg=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ module github.com/grafana/grafana/apps/iam
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
|
||||
k8s.io/apimachinery v0.33.3
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
|
||||
@@ -23,7 +23,7 @@ require (
|
||||
github.com/go-test/deep v1.1.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
|
||||
+4
-4
@@ -32,10 +32,10 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e h1:BTKk7LHuG1kmAkucwTA7DuMbKpKvJTKrGdBmUNO4dfQ=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e/go.mod h1:IA4SOwun8QyST9c5UNs/fN37XL6boXXDvRYFcFwbipg=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
|
||||
@@ -4,7 +4,7 @@ go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana v0.0.0-00010101000000-000000000000
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250725152715-69d3b9023cec
|
||||
github.com/stretchr/testify v1.10.0
|
||||
k8s.io/apimachinery v0.33.3
|
||||
@@ -49,6 +49,7 @@ require (
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/diegoholiveira/jsonlogic/v3 v3.7.4 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/elazarl/goproxy v1.7.2 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
@@ -77,12 +78,12 @@ require (
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b // indirect
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263 // indirect
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43 // indirect
|
||||
github.com/grafana/authlib/types v0.0.0-20250710201142-9542f2f28d43 // indirect
|
||||
github.com/grafana/dataplane/sdata v0.0.9 // indirect
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/grafana/grafana-aws-sdk v1.0.4 // indirect
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0 // indirect
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0 // indirect
|
||||
@@ -136,6 +137,7 @@ require (
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/nikunjy/rules v1.5.0 // indirect
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
|
||||
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
|
||||
@@ -157,6 +159,7 @@ require (
|
||||
github.com/prometheus/exporter-toolkit v0.14.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
|
||||
@@ -213,6 +216,10 @@ require (
|
||||
k8s.io/client-go v0.33.3 // indirect
|
||||
k8s.io/component-base v0.33.3 // indirect
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
|
||||
modernc.org/libc v1.65.0 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.10.0 // indirect
|
||||
modernc.org/sqlite v1.37.0 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
|
||||
|
||||
@@ -170,6 +170,8 @@ github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 h1:bMGS25NWAGTE
|
||||
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71/go.mod h1:2/2zjLQ/JOOSbbSboojeg+cAwcRV0fDLzIiWch/lhqI=
|
||||
github.com/dolthub/vitess v0.0.0-20250410090211-143e6b272ad4 h1:LGTt2LtYX8vaai32d+c9L0sMcP+Dg9w1kO6+lbsxxYg=
|
||||
github.com/dolthub/vitess v0.0.0-20250410090211-143e6b272ad4/go.mod h1:1gQZs/byeHLMSul3Lvl3MzioMtOW1je79QYGyi2fd70=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
@@ -331,8 +333,8 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
|
||||
github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b h1:mfUAq/N+mS82EcE35hDXWtfVY7UhTjzZxzssvFt9tvQ=
|
||||
github.com/grafana/alerting v0.0.0-20250725130805-615c8286e14b/go.mod h1:VKxaR93Gff0ZlO2sPcdPVob1a/UzArFEW5zx3Bpyhls=
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263 h1:hcr/AmPB0KL4H+gCEFIdKUnkihTxGAkAOiZA7GDYoL8=
|
||||
github.com/grafana/alerting v0.0.0-20250729175202-b4b881b7b263/go.mod h1:VKxaR93Gff0ZlO2sPcdPVob1a/UzArFEW5zx3Bpyhls=
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43 h1:vVPT0i5Y1vI6qzecYStV2yk7cHKrC3Pc7AgvwT5KydQ=
|
||||
github.com/grafana/authlib v0.0.0-20250710201142-9542f2f28d43/go.mod h1:1fWkOiL+m32NBgRHZtlZGz2ji868tPZACYbqP3nBRJI=
|
||||
github.com/grafana/authlib/types v0.0.0-20250710201142-9542f2f28d43 h1:NlkGMnVi/oUn6Cr90QbJYpQJ4FnjyAIG9Ex5GtTZIzw=
|
||||
@@ -341,18 +343,18 @@ github.com/grafana/dataplane/sdata v0.0.9 h1:AGL1LZnCUG4MnQtnWpBPbQ8ZpptaZs14w6k
|
||||
github.com/grafana/dataplane/sdata v0.0.9/go.mod h1:Jvs5ddpGmn6vcxT7tCTWAZ1mgi4sbcdFt9utQx5uMAU=
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914 h1:qcSGhr691f1mmPHwg2svGyO40Ex92G02aOyHzP6XHCE=
|
||||
github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914/go.mod h1:OiN4P4aC6LwLzLbEupH3Ue83VfQoNMfG48rsna8jI/E=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-aws-sdk v1.0.4 h1:D14UAehsOqpjliHmHzveRQ1p43KCsMzdmb7GovWj+SY=
|
||||
github.com/grafana/grafana-aws-sdk v1.0.4/go.mod h1:hO7q7yWV+t6dmiyJjMa3IbuYnYkBua+G/IAlOPVIYKE=
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0 h1:0TYrkzAc3u0HX+9GK86cGrLTUAcmQfl3/LEB3tL+SOA=
|
||||
github.com/grafana/grafana-azure-sdk-go/v2 v2.2.0/go.mod h1:H9sVh9A4yg5egMGZeh0mifxT1Q/uqwKe1LBjBJU6pN8=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0 h1:5/rIYparLi02pofdaag8wnjspMMVNCi8cZhC4cdC3Ho=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.278.0/go.mod h1:+8NXT/XUJ/89GV6FxGQ366NZ3nU+cAXDMd0OUESF9H4=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250716132114-6fd75ebc5441 h1:+TSbaxCXBZrKkdROWBzdWna8uStE1f9LYd7GiqjVfz8=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250716132114-6fd75ebc5441/go.mod h1:1XWiRSVuDQiayapHhQiDc4S4e9GzEZgg/3GeNCuDgn4=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250730164619-34019e5ec017 h1:Niy+KRDWHsUVqfhZQg0oZbAQFO6QcO6a4l9V/ouDEEs=
|
||||
github.com/grafana/grafana/apps/dashboard v0.0.0-20250730164619-34019e5ec017/go.mod h1:/iuseD/cEpXDiy7MpL+4qBFZ3H6esnUJTYzpoJMw9dw=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250725152715-69d3b9023cec h1:cg1GbDVZ7goqDrqoMzqeN4AeAcD271MGYjOvdVTDwfw=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250725152715-69d3b9023cec/go.mod h1:3ZgUe0E3rIhI026xF4DKFptOst/jpDHJ/Sn+bRODzI4=
|
||||
github.com/grafana/grafana/pkg/apiserver v0.0.0-20250627191313-2f1a6ae1712b h1:QyJLJn3xwFTIXu9KPZujsrIUN0X8DdiR9b2h75L0AfI=
|
||||
@@ -540,6 +542,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/nikunjy/rules v1.5.0 h1:KJDSLOsFhwt7kcXUyZqwkgrQg5YoUwj+TVu6ItCQShw=
|
||||
github.com/nikunjy/rules v1.5.0/go.mod h1:TlZtZdBChrkqi8Lr2AXocme8Z7EsbxtFdDoKeI6neBQ=
|
||||
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
|
||||
@@ -626,6 +630,8 @@ github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlT
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU=
|
||||
github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
@@ -994,6 +1000,30 @@ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUy
|
||||
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0=
|
||||
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
modernc.org/cc/v4 v4.26.0 h1:QMYvbVduUGH0rrO+5mqF/PSPPRZNpRtg2CLELy7vUpA=
|
||||
modernc.org/cc/v4 v4.26.0/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
|
||||
modernc.org/ccgo/v4 v4.26.0 h1:gVzXaDzGeBYJ2uXTOpR8FR7OlksDOe9jxnjhIKCsiTc=
|
||||
modernc.org/ccgo/v4 v4.26.0/go.mod h1:Sem8f7TFUtVXkG2fiaChQtyyfkqhJBg/zjEJBkmuAVY=
|
||||
modernc.org/fileutil v1.3.1 h1:8vq5fe7jdtEvoCf3Zf9Nm0Q05sH6kGx0Op2CPx1wTC8=
|
||||
modernc.org/fileutil v1.3.1/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
|
||||
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
|
||||
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
|
||||
modernc.org/libc v1.65.0 h1:e183gLDnAp9VJh6gWKdTy0CThL9Pt7MfcR/0bgb7Y1Y=
|
||||
modernc.org/libc v1.65.0/go.mod h1:7m9VzGq7APssBTydds2zBcxGREwvIGpuUBaKTXdm2Qs=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4=
|
||||
modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
|
||||
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
|
||||
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
|
||||
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
|
||||
modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI=
|
||||
modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
|
||||
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
|
||||
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
|
||||
|
||||
@@ -3,7 +3,7 @@ module github.com/grafana/grafana/apps/playlist
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
k8s.io/apimachinery v0.33.3
|
||||
k8s.io/client-go v0.33.3
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
@@ -30,7 +30,7 @@ require (
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
||||
@@ -47,10 +47,10 @@ github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
APP_SDK_VERSION = v0.40.1
|
||||
APP_SDK_VERSION = v0.40.2
|
||||
APP_SDK_DIR = $(shell go env GOPATH)/bin/app-sdk-$(APP_SDK_VERSION)
|
||||
APP_SDK_BIN = $(APP_SDK_DIR)/grafana-app-sdk
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ version: v1
|
||||
|
||||
plugins:
|
||||
- plugin: go
|
||||
out: apps/secret/decrypt/v1beta1
|
||||
out: apps/secret
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- plugin: go-grpc
|
||||
out: apps/secret/decrypt/v1beta1
|
||||
out: apps/secret
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- require_unimplemented_servers=false
|
||||
@@ -0,0 +1,155 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: consolidate/v1beta1/consolidate.proto
|
||||
|
||||
package consolidatev1beta1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SecretsConsolidateResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // true if successful, false if error
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // success or error message
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SecretsConsolidateResponse) Reset() {
|
||||
*x = SecretsConsolidateResponse{}
|
||||
mi := &file_consolidate_v1beta1_consolidate_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SecretsConsolidateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SecretsConsolidateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SecretsConsolidateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_consolidate_v1beta1_consolidate_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SecretsConsolidateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SecretsConsolidateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_consolidate_v1beta1_consolidate_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SecretsConsolidateResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *SecretsConsolidateResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_consolidate_v1beta1_consolidate_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_consolidate_v1beta1_consolidate_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x1a, 0x53, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x6c, 0x0a, 0x13, 0x53, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x12, 0x55, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
|
||||
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x67,
|
||||
0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
file_consolidate_v1beta1_consolidate_proto_rawDescOnce sync.Once
|
||||
file_consolidate_v1beta1_consolidate_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_consolidate_v1beta1_consolidate_proto_rawDescGZIP() []byte {
|
||||
file_consolidate_v1beta1_consolidate_proto_rawDescOnce.Do(func() {
|
||||
file_consolidate_v1beta1_consolidate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_consolidate_v1beta1_consolidate_proto_rawDesc), len(file_consolidate_v1beta1_consolidate_proto_rawDesc)))
|
||||
})
|
||||
return file_consolidate_v1beta1_consolidate_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_consolidate_v1beta1_consolidate_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_consolidate_v1beta1_consolidate_proto_goTypes = []any{
|
||||
(*SecretsConsolidateResponse)(nil), // 0: consolidatev1beta1.SecretsConsolidateResponse
|
||||
(*emptypb.Empty)(nil), // 1: google.protobuf.Empty
|
||||
}
|
||||
var file_consolidate_v1beta1_consolidate_proto_depIdxs = []int32{
|
||||
1, // 0: consolidatev1beta1.SecretsConsolidator.Consolidate:input_type -> google.protobuf.Empty
|
||||
0, // 1: consolidatev1beta1.SecretsConsolidator.Consolidate:output_type -> consolidatev1beta1.SecretsConsolidateResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_consolidate_v1beta1_consolidate_proto_init() }
|
||||
func file_consolidate_v1beta1_consolidate_proto_init() {
|
||||
if File_consolidate_v1beta1_consolidate_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_consolidate_v1beta1_consolidate_proto_rawDesc), len(file_consolidate_v1beta1_consolidate_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_consolidate_v1beta1_consolidate_proto_goTypes,
|
||||
DependencyIndexes: file_consolidate_v1beta1_consolidate_proto_depIdxs,
|
||||
MessageInfos: file_consolidate_v1beta1_consolidate_proto_msgTypes,
|
||||
}.Build()
|
||||
File_consolidate_v1beta1_consolidate_proto = out.File
|
||||
file_consolidate_v1beta1_consolidate_proto_goTypes = nil
|
||||
file_consolidate_v1beta1_consolidate_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package consolidatev1beta1;
|
||||
|
||||
option go_package = "github.com/grafana/grafana/apps/secret/consolidate/v1beta1;consolidatev1beta1";
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
message SecretsConsolidateResponse {
|
||||
bool success = 1; // true if successful, false if error
|
||||
string message = 2; // success or error message
|
||||
}
|
||||
|
||||
service SecretsConsolidator {
|
||||
// Consolidates secrets and returns success or error message.
|
||||
rpc Consolidate(google.protobuf.Empty) returns (SecretsConsolidateResponse);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc (unknown)
|
||||
// source: consolidate/v1beta1/consolidate.proto
|
||||
|
||||
package consolidatev1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
SecretsConsolidator_Consolidate_FullMethodName = "/consolidatev1beta1.SecretsConsolidator/Consolidate"
|
||||
)
|
||||
|
||||
// SecretsConsolidatorClient is the client API for SecretsConsolidator service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type SecretsConsolidatorClient interface {
|
||||
// Consolidates secrets and returns success or error message.
|
||||
Consolidate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SecretsConsolidateResponse, error)
|
||||
}
|
||||
|
||||
type secretsConsolidatorClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSecretsConsolidatorClient(cc grpc.ClientConnInterface) SecretsConsolidatorClient {
|
||||
return &secretsConsolidatorClient{cc}
|
||||
}
|
||||
|
||||
func (c *secretsConsolidatorClient) Consolidate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SecretsConsolidateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SecretsConsolidateResponse)
|
||||
err := c.cc.Invoke(ctx, SecretsConsolidator_Consolidate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SecretsConsolidatorServer is the server API for SecretsConsolidator service.
|
||||
// All implementations should embed UnimplementedSecretsConsolidatorServer
|
||||
// for forward compatibility
|
||||
type SecretsConsolidatorServer interface {
|
||||
// Consolidates secrets and returns success or error message.
|
||||
Consolidate(context.Context, *emptypb.Empty) (*SecretsConsolidateResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSecretsConsolidatorServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedSecretsConsolidatorServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSecretsConsolidatorServer) Consolidate(context.Context, *emptypb.Empty) (*SecretsConsolidateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Consolidate not implemented")
|
||||
}
|
||||
|
||||
// UnsafeSecretsConsolidatorServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SecretsConsolidatorServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSecretsConsolidatorServer interface {
|
||||
mustEmbedUnimplementedSecretsConsolidatorServer()
|
||||
}
|
||||
|
||||
func RegisterSecretsConsolidatorServer(s grpc.ServiceRegistrar, srv SecretsConsolidatorServer) {
|
||||
s.RegisterService(&SecretsConsolidator_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SecretsConsolidator_Consolidate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SecretsConsolidatorServer).Consolidate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SecretsConsolidator_Consolidate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SecretsConsolidatorServer).Consolidate(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SecretsConsolidator_ServiceDesc is the grpc.ServiceDesc for SecretsConsolidator service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SecretsConsolidator_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "consolidatev1beta1.SecretsConsolidator",
|
||||
HandlerType: (*SecretsConsolidatorServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Consolidate",
|
||||
Handler: _SecretsConsolidator_Consolidate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "consolidate/v1beta1/consolidate.proto",
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: decrypt.proto
|
||||
// source: decrypt/v1beta1/decrypt.proto
|
||||
|
||||
package decryptv1beta1
|
||||
|
||||
@@ -33,7 +33,7 @@ type SecureValueDecryptRequest struct {
|
||||
|
||||
func (x *SecureValueDecryptRequest) Reset() {
|
||||
*x = SecureValueDecryptRequest{}
|
||||
mi := &file_decrypt_proto_msgTypes[0]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func (x *SecureValueDecryptRequest) String() string {
|
||||
func (*SecureValueDecryptRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SecureValueDecryptRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_decrypt_proto_msgTypes[0]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -58,7 +58,7 @@ func (x *SecureValueDecryptRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SecureValueDecryptRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SecureValueDecryptRequest) Descriptor() ([]byte, []int) {
|
||||
return file_decrypt_proto_rawDescGZIP(), []int{0}
|
||||
return file_decrypt_v1beta1_decrypt_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SecureValueDecryptRequest) GetNamespace() string {
|
||||
@@ -87,7 +87,7 @@ type SecureValueDecryptResponseCollection struct {
|
||||
|
||||
func (x *SecureValueDecryptResponseCollection) Reset() {
|
||||
*x = SecureValueDecryptResponseCollection{}
|
||||
mi := &file_decrypt_proto_msgTypes[1]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func (x *SecureValueDecryptResponseCollection) String() string {
|
||||
func (*SecureValueDecryptResponseCollection) ProtoMessage() {}
|
||||
|
||||
func (x *SecureValueDecryptResponseCollection) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_decrypt_proto_msgTypes[1]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -112,7 +112,7 @@ func (x *SecureValueDecryptResponseCollection) ProtoReflect() protoreflect.Messa
|
||||
|
||||
// Deprecated: Use SecureValueDecryptResponseCollection.ProtoReflect.Descriptor instead.
|
||||
func (*SecureValueDecryptResponseCollection) Descriptor() ([]byte, []int) {
|
||||
return file_decrypt_proto_rawDescGZIP(), []int{1}
|
||||
return file_decrypt_v1beta1_decrypt_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SecureValueDecryptResponseCollection) GetDecryptedValues() map[string]*Result {
|
||||
@@ -135,7 +135,7 @@ type Result struct {
|
||||
|
||||
func (x *Result) Reset() {
|
||||
*x = Result{}
|
||||
mi := &file_decrypt_proto_msgTypes[2]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func (x *Result) String() string {
|
||||
func (*Result) ProtoMessage() {}
|
||||
|
||||
func (x *Result) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_decrypt_proto_msgTypes[2]
|
||||
mi := &file_decrypt_v1beta1_decrypt_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -160,7 +160,7 @@ func (x *Result) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Result.ProtoReflect.Descriptor instead.
|
||||
func (*Result) Descriptor() ([]byte, []int) {
|
||||
return file_decrypt_proto_rawDescGZIP(), []int{2}
|
||||
return file_decrypt_v1beta1_decrypt_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Result) GetResult() isResult_Result {
|
||||
@@ -204,10 +204,11 @@ func (*Result_Value) isResult_Result() {}
|
||||
|
||||
func (*Result_ErrorMessage) isResult_Result() {}
|
||||
|
||||
var File_decrypt_proto protoreflect.FileDescriptor
|
||||
var File_decrypt_v1beta1_decrypt_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_decrypt_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x0d, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
var file_decrypt_v1beta1_decrypt_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x1d, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x0e, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22,
|
||||
0x4f, 0x0a, 0x19, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65,
|
||||
0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||
@@ -252,25 +253,25 @@ var file_decrypt_proto_rawDesc = string([]byte{
|
||||
})
|
||||
|
||||
var (
|
||||
file_decrypt_proto_rawDescOnce sync.Once
|
||||
file_decrypt_proto_rawDescData []byte
|
||||
file_decrypt_v1beta1_decrypt_proto_rawDescOnce sync.Once
|
||||
file_decrypt_v1beta1_decrypt_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_decrypt_proto_rawDescGZIP() []byte {
|
||||
file_decrypt_proto_rawDescOnce.Do(func() {
|
||||
file_decrypt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_decrypt_proto_rawDesc), len(file_decrypt_proto_rawDesc)))
|
||||
func file_decrypt_v1beta1_decrypt_proto_rawDescGZIP() []byte {
|
||||
file_decrypt_v1beta1_decrypt_proto_rawDescOnce.Do(func() {
|
||||
file_decrypt_v1beta1_decrypt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_decrypt_v1beta1_decrypt_proto_rawDesc), len(file_decrypt_v1beta1_decrypt_proto_rawDesc)))
|
||||
})
|
||||
return file_decrypt_proto_rawDescData
|
||||
return file_decrypt_v1beta1_decrypt_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_decrypt_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_decrypt_proto_goTypes = []any{
|
||||
var file_decrypt_v1beta1_decrypt_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_decrypt_v1beta1_decrypt_proto_goTypes = []any{
|
||||
(*SecureValueDecryptRequest)(nil), // 0: decryptv1beta1.SecureValueDecryptRequest
|
||||
(*SecureValueDecryptResponseCollection)(nil), // 1: decryptv1beta1.SecureValueDecryptResponseCollection
|
||||
(*Result)(nil), // 2: decryptv1beta1.Result
|
||||
nil, // 3: decryptv1beta1.SecureValueDecryptResponseCollection.DecryptedValuesEntry
|
||||
}
|
||||
var file_decrypt_proto_depIdxs = []int32{
|
||||
var file_decrypt_v1beta1_decrypt_proto_depIdxs = []int32{
|
||||
3, // 0: decryptv1beta1.SecureValueDecryptResponseCollection.decrypted_values:type_name -> decryptv1beta1.SecureValueDecryptResponseCollection.DecryptedValuesEntry
|
||||
2, // 1: decryptv1beta1.SecureValueDecryptResponseCollection.DecryptedValuesEntry.value:type_name -> decryptv1beta1.Result
|
||||
0, // 2: decryptv1beta1.SecureValueDecrypter.DecryptSecureValues:input_type -> decryptv1beta1.SecureValueDecryptRequest
|
||||
@@ -282,12 +283,12 @@ var file_decrypt_proto_depIdxs = []int32{
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_decrypt_proto_init() }
|
||||
func file_decrypt_proto_init() {
|
||||
if File_decrypt_proto != nil {
|
||||
func init() { file_decrypt_v1beta1_decrypt_proto_init() }
|
||||
func file_decrypt_v1beta1_decrypt_proto_init() {
|
||||
if File_decrypt_v1beta1_decrypt_proto != nil {
|
||||
return
|
||||
}
|
||||
file_decrypt_proto_msgTypes[2].OneofWrappers = []any{
|
||||
file_decrypt_v1beta1_decrypt_proto_msgTypes[2].OneofWrappers = []any{
|
||||
(*Result_Value)(nil),
|
||||
(*Result_ErrorMessage)(nil),
|
||||
}
|
||||
@@ -295,17 +296,17 @@ func file_decrypt_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_decrypt_proto_rawDesc), len(file_decrypt_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_decrypt_v1beta1_decrypt_proto_rawDesc), len(file_decrypt_v1beta1_decrypt_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_decrypt_proto_goTypes,
|
||||
DependencyIndexes: file_decrypt_proto_depIdxs,
|
||||
MessageInfos: file_decrypt_proto_msgTypes,
|
||||
GoTypes: file_decrypt_v1beta1_decrypt_proto_goTypes,
|
||||
DependencyIndexes: file_decrypt_v1beta1_decrypt_proto_depIdxs,
|
||||
MessageInfos: file_decrypt_v1beta1_decrypt_proto_msgTypes,
|
||||
}.Build()
|
||||
File_decrypt_proto = out.File
|
||||
file_decrypt_proto_goTypes = nil
|
||||
file_decrypt_proto_depIdxs = nil
|
||||
File_decrypt_v1beta1_decrypt_proto = out.File
|
||||
file_decrypt_v1beta1_decrypt_proto_goTypes = nil
|
||||
file_decrypt_v1beta1_decrypt_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc (unknown)
|
||||
// source: decrypt.proto
|
||||
// source: decrypt/v1beta1/decrypt.proto
|
||||
|
||||
package decryptv1beta1
|
||||
|
||||
@@ -106,5 +106,5 @@ var SecureValueDecrypter_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "decrypt.proto",
|
||||
Metadata: "decrypt/v1beta1/decrypt.proto",
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ module github.com/grafana/grafana/apps/secret
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.40.1
|
||||
github.com/grafana/grafana-app-sdk v0.40.2
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250710134100-1f3dc0533caf
|
||||
github.com/stretchr/testify v1.10.0
|
||||
google.golang.org/grpc v1.74.2
|
||||
@@ -28,7 +28,7 @@ require (
|
||||
github.com/go-test/deep v1.1.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 // indirect
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
|
||||
+4
-4
@@ -36,10 +36,10 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1 h1:W8d1CQSgMg/d37xf/0t4PiSa7wVD21XFE8mF6P59YSg=
|
||||
github.com/grafana/grafana-app-sdk v0.40.1/go.mod h1:4P8h7VB6KcDjX9bAoBQc6IP8iNylxe6bSXLR9gA39gM=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0 h1:3LHA0pFM9mGGFyq6qoHvJOGEe0H0OVhzzlOKd4Ehu+E=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.0/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2 h1:j2ftFuqhX+exYUipfEjeWDs3i7oiJkweTF8gFLL7wWU=
|
||||
github.com/grafana/grafana-app-sdk v0.40.2/go.mod h1:BbNXPNki3mtbkWxYqJsyA1Cj9AShSyaY33z8WkyfVv0=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1 h1:ru+GqbaQk6jthA5l2Yo1WI/JbNXKNQmLiqNrxz7HGP4=
|
||||
github.com/grafana/grafana-app-sdk/logging v0.40.1/go.mod h1:otUD9XpJD7A5sCLb8mcs9hIXGdeV6lnhzVwe747g4RU=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250710134100-1f3dc0533caf h1:BBGDHffvVNLoYQlXEpbXcxE0vbpq7pm/8OWF5I+UDZg=
|
||||
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250710134100-1f3dc0533caf/go.mod h1:eAlOam2uWhrsEZlOoAr7XZ9hbBP7SyYGYn31/aQAPs8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
build
|
||||
@@ -25,4 +25,4 @@ To simulate the `/bootdata` endpoint being available, there are special control
|
||||
- `/-/down/:seconds` - Simulates the endpoint being unavailable for a custom number of seconds.
|
||||
- `/-/up` - Restores the endpoint to being available.
|
||||
|
||||
When unavailable, the API will return `HTTP 503 Service Unavailable` with a JSON payload.
|
||||
When unavailable, the API will return `HTTP 503 Service Unavailable` with a JSON payload.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
config.define_bool("use-zig")
|
||||
cfg = config.parse()
|
||||
|
||||
use_zig = cfg.get('docker-builder', False)
|
||||
|
||||
# --- Frontend processes
|
||||
local_resource(
|
||||
'yarn install',
|
||||
@@ -5,7 +10,7 @@ local_resource(
|
||||
deps=[
|
||||
'yarn.lock',
|
||||
],
|
||||
labels=["frontend"]
|
||||
labels=["local"]
|
||||
)
|
||||
|
||||
local_resource(
|
||||
@@ -13,63 +18,94 @@ local_resource(
|
||||
cmd='rm -rf public/build/assets-manifest.json',
|
||||
serve_cmd='yarn start:noLint',
|
||||
resource_deps=['yarn install'],
|
||||
|
||||
# Note: this doesn't seem to work as expected - the assets-manifest is somehow created before
|
||||
# the webpack build is complete?
|
||||
readiness_probe=probe(
|
||||
initial_delay_secs=5, # wait for the assets-manifest.json to first be deleted
|
||||
initial_delay_secs=10,
|
||||
period_secs=1,
|
||||
exec=exec_action(["bash", "-c", "cat public/build/assets-manifest.json | grep entrypoints"])
|
||||
exec=exec_action(["bash", "-c", "stat public/build/assets-manifest.json"]),
|
||||
),
|
||||
allow_parallel=True,
|
||||
labels=["frontend"]
|
||||
labels=["local"]
|
||||
)
|
||||
|
||||
build_backend_env = {}
|
||||
if use_zig:
|
||||
build_backend_env['USE_ZIG'] = "true"
|
||||
|
||||
local_resource(
|
||||
'backend-build',
|
||||
"bash ./build-grafana.sh",
|
||||
deps=[
|
||||
'../../pkg',
|
||||
'../../apps',
|
||||
'../../kinds',
|
||||
'../../kindsv2',
|
||||
'../../local',
|
||||
'../../scripts',
|
||||
'../../conf',
|
||||
'../../go.sum',
|
||||
'../../go.mod',
|
||||
],
|
||||
env=build_backend_env,
|
||||
allow_parallel=True,
|
||||
labels=["local"]
|
||||
)
|
||||
|
||||
# --- Docker Compose
|
||||
docker_compose("./docker-compose.yaml")
|
||||
dc_resource("proxy",
|
||||
resource_deps=["backend", "frontend-service"],
|
||||
labels=["services"]
|
||||
)
|
||||
dc_resource("backend",
|
||||
resource_deps=["yarn start", "backend-build"],
|
||||
labels=["services"]
|
||||
)
|
||||
dc_resource("frontend-service",
|
||||
resource_deps=["yarn start", "backend-build"],
|
||||
labels=["services"],
|
||||
)
|
||||
|
||||
# First argument is the name of the service from the docker-compose file.
|
||||
dc_resource("backend", resource_deps=["yarn start"], labels=["backend"])
|
||||
dc_resource("frontend-service", resource_deps=["yarn start"], labels=["backend"])
|
||||
dc_resource("proxy", resource_deps=["backend", "frontend-service"], labels=["ingress"])
|
||||
# paths in tilt files are confusing....
|
||||
# - if tilt is dealing the the path, it is relative to the Tiltfile
|
||||
# - if docker is dealing with the path, it is relative to the context
|
||||
docker_build('grafana-fs-dev',
|
||||
# Set the docker context to the root of the repo
|
||||
context='../..',
|
||||
dockerfile='grafana-fs-dev.dockerfile',
|
||||
|
||||
docker_build('grafana-backend', '../..',
|
||||
dockerfile='backend.dockerfile',
|
||||
|
||||
# Only these paths will be in the docker context, and will trigger a rebuild.
|
||||
# This must include all the files that are COPY'd in backend.dockerfile
|
||||
# Paths relative to the docker context (root of the repo)
|
||||
only=[
|
||||
"./Makefile",
|
||||
"./devenv/frontend-service/build-grafana.sh",
|
||||
|
||||
"./apps",
|
||||
"./pkg",
|
||||
"./scripts",
|
||||
|
||||
"./go.sum",
|
||||
"./go.mod",
|
||||
"./go.work",
|
||||
"./go.work.sum",
|
||||
|
||||
"./kinds",
|
||||
"./kindsv2",
|
||||
"./public/api-merged.json",
|
||||
"./package.json",
|
||||
|
||||
"./conf/defaults.ini",
|
||||
"./conf/ldap.toml",
|
||||
"./conf/ldap_multiple.toml",
|
||||
"./public/emails",
|
||||
"./public/views",
|
||||
"./public/dashboards",
|
||||
"./public/build/assets-manifest.json",
|
||||
'devenv/frontend-service/build/grafana',
|
||||
'conf/defaults.ini',
|
||||
'public/emails',
|
||||
'public/views',
|
||||
'public/dashboards',
|
||||
'public/app/plugins',
|
||||
'public/build/assets-manifest.json',
|
||||
],
|
||||
|
||||
# Sync paths are relative to the Tiltfile
|
||||
live_update = [
|
||||
sync('./build/grafana', '/grafana/bin/grafana'),
|
||||
sync('../../conf/defaults.ini', '/grafana/conf/defaults.ini'),
|
||||
sync('../../public/emails', '/grafana/public/emails'),
|
||||
sync('../../public/views', '/grafana/public/views'),
|
||||
sync('../../public/dashboards', '/grafana/public/dashboards'),
|
||||
sync('../../public/app/plugins', '/grafana/public/app/plugins'),
|
||||
sync('../../public/build/assets-manifest.json', '/grafana/public/build/assets-manifest.json'),
|
||||
restart_container()
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
docker_build('grafana-proxy', '.',
|
||||
docker_build('grafana-proxy',
|
||||
# Set the docker context to this frontend-service folder
|
||||
context='.',
|
||||
dockerfile='proxy.dockerfile',
|
||||
|
||||
# Path relative to the docker context (this folder)
|
||||
only=[
|
||||
"./nginx.conf",
|
||||
],
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
ARG BASE_IMAGE=alpine:3.21
|
||||
ARG GO_IMAGE=golang:1.24.5-alpine
|
||||
|
||||
# ----- Go build stage
|
||||
FROM ${GO_IMAGE} AS go-dev-builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
binutils-gold \
|
||||
bash \
|
||||
gcc g++ make git jq findutils
|
||||
|
||||
WORKDIR /build-grafana
|
||||
|
||||
RUN go env GOCACHE
|
||||
RUN go env GOPATH
|
||||
|
||||
# All files COPY'd here must be included in the `only` list in Tiltfile
|
||||
# otherwise the image will not build with Tilt.
|
||||
|
||||
COPY Makefile devenv/frontend-service/build-grafana.sh ./
|
||||
|
||||
# Copy go mod files first
|
||||
# run this command and replace the output below:
|
||||
# find pkg scripts apps -type f \( -name go.mod -o -name go.sum \) -print | sed -E 's#(.*)/go\.(mod|sum)$#COPY \1/go.* \1/#' | sort -u
|
||||
COPY apps/advisor/go.* apps/advisor/
|
||||
COPY apps/alerting/notifications/go.* apps/alerting/notifications/
|
||||
COPY apps/dashboard/go.* apps/dashboard/
|
||||
COPY apps/folder/go.* apps/folder/
|
||||
COPY apps/iam/go.* apps/iam/
|
||||
COPY apps/investigations/go.* apps/investigations/
|
||||
COPY apps/playlist/go.* apps/playlist/
|
||||
COPY apps/secret/go.* apps/secret/
|
||||
COPY pkg/aggregator/go.* pkg/aggregator/
|
||||
COPY pkg/apimachinery/go.* pkg/apimachinery/
|
||||
COPY pkg/apiserver/go.* pkg/apiserver/
|
||||
COPY pkg/build/go.* pkg/build/
|
||||
COPY pkg/build/wire/go.* pkg/build/wire/
|
||||
COPY pkg/codegen/go.* pkg/codegen/
|
||||
COPY pkg/plugins/codegen/go.* pkg/plugins/codegen/
|
||||
COPY pkg/promlib/go.* pkg/promlib/
|
||||
COPY pkg/semconv/go.* pkg/semconv/
|
||||
COPY scripts/go-workspace/go.* scripts/go-workspace/
|
||||
COPY scripts/modowners/go.* scripts/modowners/
|
||||
|
||||
COPY go.* ./
|
||||
|
||||
# Install dependencies
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go mod download
|
||||
|
||||
# Copy source files
|
||||
COPY kinds kinds
|
||||
COPY kindsv2 kindsv2
|
||||
COPY public/api-merged.json public/api-merged.json
|
||||
COPY apps apps
|
||||
COPY pkg pkg
|
||||
COPY package.json package.json
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
bash build-grafana.sh
|
||||
|
||||
|
||||
# ----- Runtime stage
|
||||
FROM ${BASE_IMAGE}
|
||||
RUN apk add --no-cache ca-certificates tzdata musl-utils bash
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
WORKDIR /grafana
|
||||
|
||||
RUN mkdir -p "conf/provisioning/datasources" \
|
||||
"conf/provisioning/dashboards" \
|
||||
"conf/provisioning/notifiers" \
|
||||
"conf/provisioning/plugins" \
|
||||
"conf/provisioning/access-control" \
|
||||
"conf/provisioning/alerting"
|
||||
|
||||
# Copy config files
|
||||
COPY conf/defaults.ini conf/ldap.toml conf/ldap_multiple.toml conf/
|
||||
|
||||
COPY public/emails public/emails
|
||||
COPY public/views public/views
|
||||
COPY public/dashboards public/dashboards
|
||||
|
||||
# Copy the Go binary from the go-dev-builder stage
|
||||
COPY --from=go-dev-builder /build-grafana/bin/grafana /grafana/bin/grafana
|
||||
|
||||
COPY public/build/assets-manifest.json public/build/assets-manifest.json
|
||||
|
||||
ENTRYPOINT ["bin/grafana", "server"]
|
||||
Regular → Executable
+20
-1
@@ -1,12 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ../../
|
||||
|
||||
echo "Go mod cache: $(go env GOMODCACHE), $(ls -1 $(go env GOMODCACHE) | wc -l) items"
|
||||
echo "Go build cache: $(go env GOCACHE), $(ls -1 $(go env GOCACHE) | wc -l) items"
|
||||
|
||||
# Set cross-compilation env vars only on macOS (Darwin)
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
echo "Setting up cross-compilation environment for macOS"
|
||||
export CGO_ENABLED=0
|
||||
export GOOS=linux
|
||||
export GOARCH=arm64
|
||||
fi
|
||||
|
||||
# It's not used by default now that we have CGO-less builds, but keeping this here for a
|
||||
# little bit in case it causes issues for anyone.
|
||||
if [[ -n "$USE_ZIG" ]]; then
|
||||
echo "Using Zig for cross-compilation"
|
||||
export CGO_ENABLED=1
|
||||
export CC="zig cc -target aarch64-linux"
|
||||
export CXX="zig c++ -target aarch64-linux"
|
||||
fi
|
||||
|
||||
# Need to build version into the binary so plugin compatibility works correctly
|
||||
VERSION=$(jq -r .version package.json)
|
||||
|
||||
go build -v \
|
||||
-ldflags "-X main.version=${VERSION}" \
|
||||
-gcflags "all=-N -l" \
|
||||
-o ./bin/grafana ./pkg/cmd/grafana
|
||||
-o ./devenv/frontend-service/build/grafana ./pkg/cmd/grafana
|
||||
@@ -14,24 +14,29 @@ services:
|
||||
- '3010:81' # CDN
|
||||
|
||||
backend:
|
||||
image: grafana-backend
|
||||
image: grafana-fs-dev
|
||||
build:
|
||||
context: .
|
||||
dockerfile: backend.dockerfile
|
||||
context: ../..
|
||||
dockerfile: devenv/frontend-service/grafana-fs-dev.dockerfile
|
||||
entrypoint: ['bin/grafana', 'server']
|
||||
volumes:
|
||||
- backend-data:/grafana/data
|
||||
- ../../public/app/plugins:/grafana/public/app/plugins
|
||||
environment:
|
||||
GF_FEATURE_TOGGLES_ENABLE: multiTenantFrontend
|
||||
GF_SERVER_CDN_URL: http://localhost:3010
|
||||
GF_FEATURE_TOGGLES_ENABLE: multiTenantFrontend
|
||||
GF_DATABASE_TYPE: postgres
|
||||
GF_DATABASE_HOST: postgres
|
||||
GF_DATABASE_NAME: grafana
|
||||
GF_DATABASE_USER: grafana
|
||||
GF_DATABASE_PASSWORD: grafana
|
||||
ports:
|
||||
- '3011:3000'
|
||||
|
||||
frontend-service:
|
||||
image: grafana-backend
|
||||
image: grafana-fs-dev
|
||||
build:
|
||||
dockerfile: backend.dockerfile
|
||||
context: ../..
|
||||
dockerfile: devenv/frontend-service/grafana-fs-dev.dockerfile
|
||||
entrypoint: ['bin/grafana', 'server', 'target']
|
||||
ports:
|
||||
- '3012:3000'
|
||||
@@ -41,5 +46,15 @@ services:
|
||||
GF_SECURITY_CONTENT_SECURITY_POLICY: false
|
||||
GF_SERVER_CDN_URL: http://localhost:3010
|
||||
|
||||
postgres:
|
||||
image: postgres:16.1-alpine3.19
|
||||
environment:
|
||||
POSTGRES_USER: grafana
|
||||
POSTGRES_PASSWORD: grafana
|
||||
POSTGRES_DB: grafana
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
backend-data:
|
||||
postgres-data:
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
WORKDIR /grafana
|
||||
|
||||
RUN mkdir -p "conf/provisioning/datasources" \
|
||||
"conf/provisioning/dashboards" \
|
||||
"conf/provisioning/notifiers" \
|
||||
"conf/provisioning/plugins" \
|
||||
"conf/provisioning/access-control" \
|
||||
"conf/provisioning/alerting"
|
||||
|
||||
COPY conf/defaults.ini conf/defaults.ini
|
||||
|
||||
COPY public/emails public/emails
|
||||
COPY public/views public/views
|
||||
COPY public/dashboards public/dashboards
|
||||
COPY public/app/plugins public/app/plugins
|
||||
|
||||
ADD devenv/frontend-service/build/grafana bin/grafana
|
||||
|
||||
COPY public/build/assets-manifest.json public/build/assets-manifest.json
|
||||
|
||||
ENTRYPOINT ["bin/grafana", "server"]
|
||||
@@ -19,7 +19,6 @@ if ! tilt version &> /dev/null; then
|
||||
IS_OKAY=false
|
||||
fi
|
||||
|
||||
|
||||
if [ "$IS_OKAY" = false ]; then
|
||||
echo "Please fix the above errors before continuing"
|
||||
exit 1
|
||||
|
||||
@@ -60,7 +60,7 @@ server {
|
||||
# API calls go to the backend
|
||||
# Cheat with app plugin paths and route them to the backend. These should come from
|
||||
# the Plugin CDN
|
||||
location ~ ^/(api|apis|bootdata|logout|public\/plugins\/grafana\-\w+\-app) {
|
||||
location ~ ^/(api|apis|avatar|bootdata|render|logout|public\/plugins) {
|
||||
if ($cookie_fs_unavailable) {
|
||||
add_header Content-Type application/json always;
|
||||
return 503 '{"code":"Loading", "message": "Soon!"}';
|
||||
|
||||
@@ -290,7 +290,7 @@ The following customizations are available via support:
|
||||
- Enabling [feature toggles](http://www.grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles).
|
||||
- [Single sign-on and team sync using SAML, LDAP, or OAuth](http://www.grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication).
|
||||
- Enable [embedding Grafana dashboards in other applications](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#allow_embedding) for Grafana Cloud contracted customers.
|
||||
- [Audit logging](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/audit-grafana/) ([Usage insights logs and dashboards](https://grafana.com/docs/grafana-cloud/account-management/usage-insights/) are available in Grafana Cloud Pro and Advanced by default).
|
||||
- [Audit logging](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/audit-grafana/) ([Usage insights logs and dashboards](https://grafana.com/docs/grafana-cloud/account-management/usage-insights/) are available in select Grafana Cloud paid accounts).
|
||||
|
||||
Note that the following custom configurations are not supported in Grafana Cloud:
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ You can find the public data sources that support alert rules in the [Grafana Pl
|
||||
In Grafana Cloud, the number of Grafana-managed alert rules you can create depends on your Grafana Cloud plan.
|
||||
|
||||
- Free Forever plan: You can create up to 100 free alert rules, with each alert rule having a maximum of 1000 alert instances.
|
||||
- All paid plans (Pro and Advanced): They have a soft limit of 2000 alert rules and support unlimited alert instances. To increase the limit, open a support ticket from the [Cloud portal](/docs/grafana-cloud/account-management/support/).
|
||||
- All paid plans: They have a soft limit of 2000 alert rules and support unlimited alert instances. To increase the limit, open a support ticket from the [Cloud portal](/docs/grafana-cloud/account-management/support/).
|
||||
|
||||
### Permissions
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ By default, notification messages include a link to the dashboard panel. Additio
|
||||
|
||||
## Create alert rules from panels
|
||||
|
||||
{{< shared id="create-alert-from-panel" >}}
|
||||
|
||||
To streamline alert creation, you can create an alert rule directly from a panel.
|
||||
|
||||
1. Navigate to a dashboard in the **Dashboards** section.
|
||||
@@ -77,6 +79,8 @@ To streamline alert creation, you can create an alert rule directly from a panel
|
||||
- Sets the alert rule query using the panel query.
|
||||
1. Complete the alert rule configuration and click **Save rule** to initiate the alert rule.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
You can then [view the alert state on the panel](ref:view-alert-state-on-panels).
|
||||
|
||||
By default, notification messages include a link to the dashboard panel. Additionally, you can [enable displaying panel screenshots in notifications](ref:images-in-notifications).
|
||||
|
||||
@@ -21,6 +21,8 @@ This section provides a set of guides and examples of best practices for Grafana
|
||||
|
||||
Designing and configuring an alert management set up that works takes time. Here are some additional tips on how to create an effective alert management set up:
|
||||
|
||||
{{< shared id="alert-planning-fundamentals" >}}
|
||||
|
||||
**Which are the key metrics for your business that you want to monitor and alert on?**
|
||||
|
||||
- Find events that are important to know about and not so trivial or frequent that recipients ignore them.
|
||||
@@ -44,3 +46,5 @@ Designing and configuring an alert management set up that works takes time. Here
|
||||
- Avoid noisy, unnecessary alerts by using silences, mute timings, or pausing alert rule evaluation.
|
||||
- Continually tune your alert rules to review effectiveness. Remove alert rules to avoid duplication or ineffective alerts.
|
||||
- Continually review your thresholds and evaluation rules.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
@@ -81,30 +81,40 @@ Alert instances are routed for [notifications](ref:notifications) in two scenari
|
||||
|
||||
## Evaluation group
|
||||
|
||||
Every alert rule and recording rule is assigned to an evaluation group.
|
||||
{{< shared id="evaluation-group-basics" >}}
|
||||
|
||||
Each evaluation group contains an **evaluation interval** that determines how frequently the rule is checked. For instance, the evaluation may occur every `10s`, `30s`, `1m`, `10m`, etc.
|
||||
Every alert rule and recording rule is assigned to an evaluation group. Each evaluation group contains an **evaluation interval** that determines how frequently the rule is checked. For instance, the evaluation may occur every `10s`, `30s`, `1m`, `10m`, etc.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
Rules can be evaluated concurrently or sequentially. For details, see [How rules are evaluated within a group](ref:evaluation-within-a-group).
|
||||
|
||||
## Pending period
|
||||
|
||||
{{< shared id="pending-period-basics" >}}
|
||||
|
||||
You can set a **Pending period** to prevent unnecessary notifications caused by temporary issues.
|
||||
|
||||
When the alert condition is met, the alert instance enters the **Pending** state. It remains in this state until the condition has been continuously true for the entire **Pending period**.
|
||||
|
||||
This ensures the condition breach is stable before the alert transitions to the **Alerting** state and routed for notification.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
- **Normal** -> **Pending** -> **Alerting**<sup>\*</sup>
|
||||
|
||||
You can also set the **Pending period** to zero to skip the **Pending** state entirely and transition to **Alerting** immediately.
|
||||
|
||||
## Keep firing for
|
||||
|
||||
{{< shared id="keep-firing-for" >}}
|
||||
|
||||
You can set a **Keep firing for** period to avoid repeated firing-resolving-firing notifications caused by flapping conditions.
|
||||
|
||||
When the alert condition is no longer met during the **Alerting** state, the alert instance enters the **Recovering** state.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
- **Alerting** → **Recovering** → **Normal (Resolved)**<sup>\*</sup>
|
||||
- After the **Keep firing for** period elapses, the alert transitions to the **Normal** state and is marked as **Resolved**.
|
||||
- If the alert condition is met again, the alert transitions back to the **Alerting** state, and no new notifications are sent.
|
||||
|
||||
@@ -62,10 +62,14 @@ Labels and annotations add additional information about an alert using key/value
|
||||
|
||||
## Labels
|
||||
|
||||
{{< shared id="labels-basics" >}}
|
||||
|
||||
**Labels** are unique identifiers of an [alert instance](ref:alert-instances). You can use them for searching, silencing, and routing notifications.
|
||||
|
||||
Examples of labels are `server=server1` or `team=backend`. Each alert rule can have more than one label and the complete set of labels for an alert rule is called its label set. It is this label set that identifies the alert.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
For example, an alert instance might have the label set `{alertname="High CPU usage",server="server1"}` while another alert instance might have the label set `{alertname="High CPU usage",server="server2"}`. These are two separate alert instances because although their `alertname` labels are the same, their `server` labels are different.
|
||||
|
||||
{{< figure alt="Image shows an example of an alert instance and the labels used on the alert instance." src="/static/img/docs/alerting/unified/multi-dimensional-alert.png" >}}
|
||||
@@ -134,6 +138,8 @@ If multiple label keys are sanitized to the same value, the duplicates have a sh
|
||||
|
||||
## Annotations
|
||||
|
||||
{{< shared id="annotations-basics" >}}
|
||||
|
||||
Annotations add additional information to alert instances, helping responders identify and address potential issues.
|
||||
|
||||
Create clear and self-explanatory annotations so that first responders can investigate without needing deeper knowledge of the alert setup.
|
||||
@@ -145,6 +151,8 @@ Annotations are displayed in Grafana and are included by default in notification
|
||||
- `runbook_url`: The runbook page to guide operators managing a potential incident.
|
||||
- `__dashboardUid__` and `__panelId__`: [Link the alert to a dashboard and panel](ref:link-alert-rules-to-panels) to facilitate alert investigation.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
For example, you can edit the annotation `summary` to explain why the alert was triggered:
|
||||
|
||||
```
|
||||
|
||||
@@ -83,10 +83,14 @@ Start defining your [contact points](ref:contact-points) to specify how to recei
|
||||
|
||||
### Contact points
|
||||
|
||||
{{< shared id="contact-points-fundamentals" >}}
|
||||
|
||||
[Contact points](ref:contact-points) contain the configuration for sending alert notifications, specifying destinations like email, Slack, IRM, webhooks, and their notification messages.
|
||||
|
||||
A contact point is a list of integrations, each sending a message to a specific destination.
|
||||
|
||||
{{< /shared >}}
|
||||
|
||||
By default, notification messages include common alert details, such as the number of alerts, alert names, labels, annotations, and other alert information. You can also customize notification messages and use notification templates.
|
||||
|
||||
First, create the contact point and test the notifications. Then, configure the alert rule to send its notifications to either a contact point or through Notification Policies.
|
||||
|
||||
@@ -86,8 +86,6 @@ You can alternatively use other sorting criteria, such as **Alphabetical**, to r
|
||||
In the above example, a Lucene query filters documents based on the `hostname` property using a variable named `$hostname`.
|
||||
The example also uses a variable in the _Terms_ group by field input box, which you can use to quickly change how data is grouped.
|
||||
|
||||
To view an example dashboard on Grafana Play, see the [Elasticsearch Templated Dashboard](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1).
|
||||
|
||||
## Create a query
|
||||
|
||||
Write the query using a custom JSON string, with the field mapped as a [keyword](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#keyword) in the Elasticsearch index mapping.
|
||||
|
||||
@@ -49,148 +49,78 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
transformations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/transform-data/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/transform-data/
|
||||
alerting:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/
|
||||
visualizations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/
|
||||
variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
annotate-visualizations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/annotate-visualizations/
|
||||
set-up-grafana-monitoring:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
configure-mssql-data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/configure
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/configure
|
||||
mssql-query-editor:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/query-editor/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/query-editor/
|
||||
mssql-template-variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/template-variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mssql/template-variables/
|
||||
query-caching:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/#query-and-resource-caching
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/#query-and-resource-caching
|
||||
---
|
||||
|
||||
# Microsoft SQL Server data source
|
||||
# Microsoft SQL Server (MSSQL) data source
|
||||
|
||||
Grafana ships with built-in support for Microsoft SQL Server (MS SQL).
|
||||
You can query and visualize data from any Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database.
|
||||
Grafana ships with built-in support for Microsoft SQL Server (MSSQL).
|
||||
You can query and visualize data from any Microsoft SQL Server 2005 or newer, including the Microsoft Azure SQL Database.
|
||||
|
||||
This topic explains configuration specific to the Microsoft SQL Server data source.
|
||||
Use this data source to create dashboards, explore SQL data, and monitor MSSQL-based workloads in real time.
|
||||
|
||||
For instructions on how to add a data source to Grafana, refer to the [administration documentation](ref:data-source-management).
|
||||
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.
|
||||
The following documentation helps you get started working with the Microsoft SQL Server (MSSQL) data source:
|
||||
|
||||
Once you've added the Microsoft SQL Server data source, you can [configure it](#configure-the-data-source) so that your Grafana instance's users can create queries in its [query editor](query-editor/) when they [build dashboards](ref:build-dashboards) and use [Explore](ref:explore).
|
||||
- [Configure the Microsoft SQL Server data source](ref:configure-mssql-data-source)
|
||||
- [Microsoft SQL Server query editor](ref:mssql-query-editor)
|
||||
- [Microsoft SQL Server template variables](ref:mssql-template-variables)
|
||||
|
||||
## Configure the data source
|
||||
## Get the most out of the data source
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
After installing and configuring the Microsoft SQL Server data source, you can:
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Microsoft SQL Server` in the search bar.
|
||||
1. Select **Microsoft SQL Server**.
|
||||
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **Host** | Sets the IP address/hostname and optional port of your MS SQL instance. Default port is 0, the driver default. You can specify multiple connection properties, such as `ApplicationIntent`, by separating each property with a semicolon (`;`). |
|
||||
| **Database** | Sets the name of your MS SQL database. |
|
||||
| **Authentication** | Sets the authentication mode, either using SQL Server authentication, Windows authentication (single sign-on for Windows users), Azure Active Directory authentication, or various forms of Windows Active Directory authentication. |
|
||||
| **User** | Defines the database user's username. |
|
||||
| **Password** | Defines the database user's password. |
|
||||
| **Encrypt** | Determines whether or to which extent a secure SSL TCP/IP connection will be negotiated with the server. Options include: `disable` - data sent between client and server is not encrypted; `false` - data sent between client and server is not encrypted beyond the login packet; `true` - data sent between client and server is encrypted. Default is `false`. |
|
||||
| **Max open** | Sets the maximum number of open connections to the database. Default is `100`. |
|
||||
| **Max idle** | Sets the maximum number of connections in the idle connection pool. Default is `100`. |
|
||||
| **Auto (max idle)** | If set will set the maximum number of idle connections to the number of maximum open connections. Default is `true`. |
|
||||
| **Max lifetime** | Sets the maximum number of seconds that the data source can reuse a connection. Default is `14400` (4 hours). |
|
||||
|
||||
You can also configure settings specific to the Microsoft SQL Server data source. These options are described in the sections below.
|
||||
|
||||
### Min time interval
|
||||
|
||||
The **Min time interval** setting defines a lower limit for the [`$__interval`](ref:add-template-variables-interval) and [`$__interval_ms`][add-template-variables-interval_ms] variables.
|
||||
|
||||
This value _must_ be formatted as a number followed by a valid time identifier:
|
||||
|
||||
| Identifier | Description |
|
||||
| ---------- | ----------- |
|
||||
| `y` | year |
|
||||
| `M` | month |
|
||||
| `w` | week |
|
||||
| `d` | day |
|
||||
| `h` | hour |
|
||||
| `m` | minute |
|
||||
| `s` | second |
|
||||
| `ms` | millisecond |
|
||||
|
||||
We recommend setting this value to match your Microsoft SQL Server write frequency.
|
||||
For example, use `1m` if Microsoft SQL Server writes data every minute.
|
||||
|
||||
You can also override this setting in a dashboard panel under its data source options.
|
||||
|
||||
### Connection timeout
|
||||
|
||||
The **Connection timeout** setting defines the maximum number of seconds to wait for a connection to the database before timing out. Default is 0 for no timeout.
|
||||
|
||||
### UDP Preference Limit
|
||||
|
||||
The **UDP Preference Limit** setting defines the maximum size packet that the Kerberos libraries will attempt to send over a UDP connection before retrying with TCP. Default is 1 which means always use TCP.
|
||||
|
||||
### DNS Lookup KDC
|
||||
|
||||
The **DNS Lookup KDC** setting controls whether to [lookup KDC in DNS](https://web.mit.edu/kerberos/krb5-latest/doc/admin/realm_config.html#mapping-hostnames-onto-kerberos-realms). Default is true.
|
||||
|
||||
### KRB5 config file path
|
||||
|
||||
The **KRB5 config file path** stores the location of the `krb5` config file. Default is `/etc/krb5.conf`
|
||||
|
||||
### Database user permissions
|
||||
|
||||
Grafana doesn't validate that a query is safe, and could include any SQL statement.
|
||||
For example, Microsoft SQL Server would execute destructive queries like `DELETE FROM user;` and `DROP TABLE user;` if the querying user has permission to do so.
|
||||
|
||||
To protect against this, we strongly recommend that you create a specific MS SQL user with restricted permissions.
|
||||
|
||||
Grant only `SELECT` permissions on the specified database and tables that you want to query to the database user you specified when you added the data source:
|
||||
|
||||
```sql
|
||||
CREATE USER grafanareader WITH PASSWORD 'password'
|
||||
GRANT SELECT ON dbo.YourTable3 TO grafanareader
|
||||
```
|
||||
|
||||
Also, ensure that the user doesn't have any unwanted privileges from the public role.
|
||||
|
||||
### Diagnose connection issues
|
||||
|
||||
If you use older versions of Microsoft SQL Server, such as 2008 and 2008R2, you might need to disable encryption before you can connect the data source.
|
||||
|
||||
We recommend that you use the latest available service pack for optimal compatibility.
|
||||
|
||||
### Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
|
||||
|
||||
#### Provisioning example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: MSSQL
|
||||
type: mssql
|
||||
url: localhost:1433
|
||||
user: grafana
|
||||
jsonData:
|
||||
database: grafana
|
||||
maxOpenConns: 100
|
||||
maxIdleConns: 100
|
||||
maxIdleConnsAuto: true
|
||||
connMaxLifetime: 14400
|
||||
connectionTimeout: 0
|
||||
encrypt: 'false'
|
||||
secureJsonData:
|
||||
password: 'Password!'
|
||||
```
|
||||
|
||||
## Query the data source
|
||||
|
||||
You can create queries with the Microsoft SQL Server data source's query editor when editing a panel that uses a MS SQL data source.
|
||||
|
||||
For details, refer to the [query editor documentation](query-editor/).
|
||||
|
||||
## Use template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For details, see the [template variables documentation](template-variables/).
|
||||
- Create a wide variety of [visualizations](ref:visualizations)
|
||||
- Configure and use [templates and variables](ref:variables)
|
||||
- Add [transformations](ref:transformations)
|
||||
- Add [annotations](ref:annotate-visualizations)
|
||||
- Set up [alerting](ref:alerting)
|
||||
- Optimize performance with [query caching](ref:query-caching)
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../data-sources/mssql/
|
||||
description: This document provides instructions for configuring the MSSQL data source.
|
||||
keywords:
|
||||
- grafana
|
||||
- MSSQL
|
||||
- Microsoft
|
||||
- SQL
|
||||
- guide
|
||||
- Azure SQL Database
|
||||
- queries
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Configure
|
||||
title: Configure the Microsoft SQL Server data source
|
||||
weight: 200
|
||||
refs:
|
||||
query-transform-data:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/
|
||||
table:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/
|
||||
configure-standard-options-display-name:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-standard-options/#display-name
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-standard-options/#display-name
|
||||
annotate-visualizations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
data-source-management:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
private-data-source-connect:
|
||||
- pattern: /docs/grafana/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
|
||||
configure-pdc:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
|
||||
provision-grafana:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/
|
||||
add-template-variables-interval-ms:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#__interval_ms
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#__interval_ms
|
||||
add-template-variables-interval:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#__interval
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#__interval
|
||||
data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
---
|
||||
|
||||
# Configure the Microsoft SQL Server data source
|
||||
|
||||
This document provides instructions for configuring the Microsoft SQL Server data source and explains available configuration options. For general information on adding and managing data sources, refer to [Grafana data sources](ref:data-sources) and [Data source management](ref:data-source-management).
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Grafana comes with a built-in MSSQL data source plugin, eliminating the need to install a plugin.
|
||||
|
||||
- You must have the `Organization administrator` role to configure the MSSQL data source. Organization administrators can also [configure the data source via YAML](#provision-the-data-source) with the Grafana provisioning system.
|
||||
|
||||
- Familiarize yourself with your MSSQL security configuration and gather any necessary security certificates and client keys.
|
||||
|
||||
- Verify that data from MSSQL is being written to your Grafana instance.
|
||||
|
||||
## Add the MSSQL data source
|
||||
|
||||
To add the MSSQL data source, complete the following steps:
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Click **Add new connection**
|
||||
1. Type `Microsoft SQL Server` in the search bar.
|
||||
1. Select **Microsoft SQL Server** under data source.
|
||||
1. Click **Add new data source** in the upper right.
|
||||
|
||||
Grafana takes you to the **Settings** tab, where you will set up your Microsoft SQL Server configuration.
|
||||
|
||||
## Configure the data source in the UI
|
||||
|
||||
Following are configuration options for the Microsoft SQL Server data source.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
Kerberos is not supported in Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Name** | The data source name. Sets the name you use to refer to the data source in panels and queries. Examples: `MSSQL-1`, `MSSQL_Sales1`. |
|
||||
| **Default** | Toggle to select as the default name in dashboard panels. When you go to a dashboard panel, this will be the default selected data source. |
|
||||
|
||||
**Connection:**
|
||||
|
||||
| Setting | Description |
|
||||
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Host** | Sets the IP address or hostname (and optional port) of your MSSQL instance. The default port is `0`, which uses the driver's default. <br> You can include additional connection properties (e.g., `ApplicationIntent`) by separating them with semicolons (`;`). |
|
||||
| **Database** | Sets the name of the MSSQL database to connect to. |
|
||||
|
||||
**TLS/SSL Auth:**
|
||||
|
||||
Encrypt - Determines whether or to which extent a secure SSL TCP/IP connection will be negotiated with the server.
|
||||
|
||||
| Encrypt Setting | Description |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------ |
|
||||
| **Disable** | Data sent between the client and server is **not encrypted**. |
|
||||
| **False** | The default setting. Only the login packet is encrypted; **all other data is sent unencrypted**. |
|
||||
| **True** | **All data** sent between the client and server is **encrypted**. |
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
If you're using an older version of Microsoft SQL Server like 2008 and 2008R2, you may need to disable encryption to be able to connect.
|
||||
{{< /admonition >}}
|
||||
|
||||
**Authentication:**
|
||||
|
||||
| Authentication Type | Description | Credentials / Fields |
|
||||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| **SQL Server Authentication** | Default method to connect to MSSQL. Use a SQL Server or Windows login in `DOMAIN\User` format. | - **Username**: SQL Server username<br>- **Password**: SQL Server password |
|
||||
| **Windows Authentication**<br>(Integrated Security) | Uses the logged-in Windows user's credentials via single sign-on. Available only when SQL Server allows Windows Authentication. | No input required; uses the logged-in Windows user's credentials |
|
||||
| **Windows AD**<br>(Username/Password) | Authenticates a domain user with their Active Directory username and password. | - **Username**: `user@example.com`<br>- **Password**: Active Directory password |
|
||||
| **Windows AD**<br>(Keytab) | Authenticates a domain user using a keytab file. | - **Username**: `user@example.com`<br>- **Keytab file path**: Path to your keytab file |
|
||||
| **Windows AD**<br>(Credential Cache) | Uses a Kerberos credential cache already loaded in memory (e.g., from a prior `kinit` command). No file needed. | - **Credential cache path**: Path to in-memory credential (e.g., `/tmp/krb5cc_1000`) |
|
||||
| **Windows AD**<br>(Credential Cache File) | Authenticates a domain user using a credential cache file (`.ccache`). | - **Username**: `user@example.com`<br>- **Credential cache file path**: e.g., `/home/grot/cache.json` |
|
||||
|
||||
**Additional settings:**
|
||||
|
||||
Additional settings are optional settings you configure for more control over your data source. This includes connection limits, connection timeout, group-by time interval, and Secure Socks Proxy.
|
||||
|
||||
**Connection limits**:
|
||||
|
||||
| Setting | Description |
|
||||
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Max open** | The maximum number of open connections to the database. If set to `0`, there is no limit. If `max open` is greater than `0` and less than `max idle`, `max idle` is adjusted to match. |
|
||||
| **Auto max idle** | When enabled, automatically sets `max idle` to match `max open`. If `max open` isn’t set, it defaults to `100`. |
|
||||
| **Max idle** | The maximum number of idle connections in the pool. If `max open` is set and is lower than `max idle`, then `max idle` is reduced to match. If set to `0`, no idle connections are retained. |
|
||||
| **Max lifetime** | The maximum time (in seconds) a connection can be reused before being closed and replaced. If set to `0`, connections are reused indefinitely. |
|
||||
|
||||
**Connection details:**
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Min time interval** | Specifies the lower bound for the auto-generated `GROUP BY` time interval. Grafana recommends matching this value to your data's write frequency—for example, `1m` if data is written every minute. Refer to [Min time interval](#min-time-interval) for details. |
|
||||
| **Connection timeout** | Specifies the maximum number of seconds to wait when attempting to connect to the database before timing out. A value of `0` (the default) disables the timeout. |
|
||||
|
||||
**Windows ADS Advanced Settings**
|
||||
|
||||
| Setting | Description | Default |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
||||
| **UDP Preference Limit** | Defines the maximum packet size (in bytes) that Kerberos libraries will attempt to send over UDP before retrying with TCP. A value of `1` forces all communication to use TCP. | `1` (always use TCP) |
|
||||
| **DNS Lookup KDC** | Controls whether DNS `SRV` records are used to locate [Key Distribution Centers (KDCs)](https://web.mit.edu/kerberos/krb5-latest/doc/admin/realm_config.html#key-distribution-centers) and other servers for the realm. | `true` |
|
||||
| **krb5 config file path** | Specifies the path to the Kerberos configuration file used by the [MIT krb5 package](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html). | `/etc/krb5.conf` |
|
||||
|
||||
**Private data source connect** - _Only for Grafana Cloud users._
|
||||
|
||||
Private data source connect, or PDC, allows you to establish a private, secured connection between a Grafana Cloud instance, or stack, and data sources secured within a private network. Click the drop-down to locate the URL for PDC. For more information regarding Grafana PDC refer to [Private data source connect (PDC)](ref:private-data-source-connect) and [Configure Grafana private data source connect (PDC)](ref:configure-pdc) for instructions on setting up a PDC connection.
|
||||
|
||||
Click **Manage private data source connect** to open your PDC connection page and view your configuration details.
|
||||
|
||||
After configuring your MSSQL data source options, click **Save & test** at the bottom to test the connection. You should see a confirmation dialog box that says:
|
||||
|
||||
**Database Connection OK**
|
||||
|
||||
### Min time interval
|
||||
|
||||
The **Min time interval** setting defines a lower limit for the [`$__interval`](ref:add-template-variables-interval) and [`$__interval_ms`][add-template-variables-interval_ms] variables.
|
||||
|
||||
This value _must_ be formatted as a number followed by a valid time identifier:
|
||||
|
||||
| Identifier | Description |
|
||||
| ---------- | ----------- |
|
||||
| `y` | year |
|
||||
| `M` | month |
|
||||
| `w` | week |
|
||||
| `d` | day |
|
||||
| `h` | hour |
|
||||
| `m` | minute |
|
||||
| `s` | second |
|
||||
| `ms` | millisecond |
|
||||
|
||||
Grafana recommends setting this value to match your Microsoft SQL Server write frequency.
|
||||
For example, use `1m` if Microsoft SQL Server writes data every minute.
|
||||
|
||||
You can also override this setting in a dashboard panel under its data source options.
|
||||
|
||||
### Database user permissions
|
||||
|
||||
When adding a data source, ensure the database user you specify has only SELECT permissions on the relevant database and tables. Grafana does not validate the safety of queries, which means they can include potentially harmful SQL statements, such as `USE otherdb`; or `DROP TABLE user;`, which could get executed. To minimize this risk, Grafana strongly recommends creating a dedicated MySQL user with restricted permissions.
|
||||
|
||||
```sql
|
||||
CREATE USER grafanareader WITH PASSWORD 'password'
|
||||
GRANT SELECT ON dbo.YourTable3 TO grafanareader
|
||||
```
|
||||
|
||||
Also, ensure that the user doesn't have any unwanted privileges from the public role.
|
||||
|
||||
### Diagnose connection issues
|
||||
|
||||
If you use older versions of Microsoft SQL Server, such as 2008 and 2008R2, you might need to disable encryption before you can connect the data source.
|
||||
|
||||
Grafana recommends that you use the latest available service pack for optimal compatibility.
|
||||
|
||||
### Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of the Grafana provisioning system. For more information about provisioning, and for available configuration options, refer to [Provision Grafana](ref:provision-grafana).
|
||||
|
||||
#### Provisioning example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: MSSQL
|
||||
type: mssql
|
||||
url: localhost:1433
|
||||
user: grafana
|
||||
jsonData:
|
||||
database: grafana
|
||||
maxOpenConns: 100
|
||||
maxIdleConns: 100
|
||||
maxIdleConnsAuto: true
|
||||
connMaxLifetime: 14400
|
||||
connectionTimeout: 0
|
||||
encrypt: 'false'
|
||||
secureJsonData:
|
||||
password: 'Password!'
|
||||
```
|
||||
@@ -39,64 +39,94 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
---
|
||||
|
||||
# Microsoft SQL Server query editor
|
||||
|
||||
You can create queries with the Microsoft SQL Server data source's query editor when editing a panel that uses a MS SQL data source.
|
||||
Grafana provides a query editor for the Microsoft SQL Server data source, which is located on the [Explore page](ref:explore). You can also access the MSSQL query editor from a dashboard panel. Click the menu in the upper right of the panel and select **Edit**.
|
||||
|
||||
This topic explains querying specific to the MS SQL data source.
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data](ref:query-transform-data).
|
||||
This topic explains querying specific to the MSSQL data source.
|
||||
For general documentation on querying data sources in Grafana, refer to [Query and transform data](ref:query-transform-data). For options and functions common to all query editors, refer to [Query editors](ref:query-transform-data).
|
||||
|
||||
## Choose a query editing mode
|
||||
For more information on writing Transact-SQL statements, refer to [Write Transact-SQL statements](https://learn.microsoft.com/en-us/sql/t-sql/tutorial-writing-transact-sql-statements?view=sql-server-ver17) and [Transact-SQL reference](https://learn.microsoft.com/en-us/sql/t-sql/language-reference?view=sql-server-ver17) in the Microsoft SQL Server documentation.
|
||||
|
||||
You can switch the query editor between two modes:
|
||||
The Microsoft SQL Server query editor has two modes:
|
||||
|
||||
- [Code mode](#code-mode), which provides a feature-rich editor for writing queries
|
||||
- [Builder mode](#builder-mode), which provides a visual query designer
|
||||
- [Builder mode](#builder-mode)
|
||||
- [Code mode](#code-mode)
|
||||
|
||||
To switch between the editor modes, select the corresponding **Builder** and **Code** tabs above the editor.
|
||||
To switch between the editor modes, select the corresponding **Builder** and **Code** tabs in the upper right.
|
||||
|
||||
To run a query, select **Run query** located at the top right corner of the editor.
|
||||

|
||||
|
||||
The query editor also provides:
|
||||
{{< admonition type="warning" >}}
|
||||
When switching from **Code** mode to **Builder** mode, any changes made to your SQL query aren't saved and will not be shown in the builder interface. You can choose to copy your code to the clipboard or discard the changes.
|
||||
{{< /admonition >}}
|
||||
|
||||
- [Macros](#use-macros)
|
||||
To run a query, select **Run query** in the upper right of the editor.
|
||||
|
||||
In addition to writing queries, the query editor also allows you to create and use:
|
||||
|
||||
- [Macros](#macros)
|
||||
- [Annotations](#apply-annotations)
|
||||
- [Stored procedures](#use-stored-procedures)
|
||||
|
||||
## Configure common options
|
||||
## Builder mode
|
||||
|
||||
You can configure a MS SQL-specific response format in the query editor regardless of its mode.
|
||||
**Builder mode** allows you to build queries using a visual interface. This mode is great for users who prefer a guided query experience or are just getting started with SQL.
|
||||
|
||||
### Choose a response format
|
||||
{{< figure alt="MSSQL builder mode>" src="/media/docs/mssql/mssql-builder-mode-v12.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
Grafana can format the response from MS SQL as either a table or as a time series.
|
||||
The following components will help you build a T-SQL query:
|
||||
|
||||
To choose a response format, select either the **Table** or **Time series** formats from the **Format** dropdown.
|
||||
- **Format** - Select a format response from the drop-down for the MSSQL query. The default is **Table**. Refer to [Table queries](#table-queries) and [Time series queries](#time-series-queries) for more information and examples. If you select the **Time series** format option, you must include a `time` column.
|
||||
|
||||
To use the time series format, you must name one of the MS SQL columns `time`.
|
||||
You can use time series queries, but not table queries, in alerting conditions.
|
||||
- **Dataset** - Select a database to query from the drop-down. Grafana automatically populates the drop-down with all databases the user has access to. If a default database is configured in the Data Source Configuration page or via a provisioning file, users will be limited to querying only that predefined database.
|
||||
|
||||
For details about using these formats, refer to [Use table queries](#use-table-queries) and [Use time series queries](#use-time-series-queries).
|
||||
Note that `tempdb`, `model`, `msdb`, and `master` system databases are not included in the query editor drop-down.
|
||||
|
||||
- **Table** - Select a table from the drop-down. After selecting a database, the next drop-down displays all available tables in that database.
|
||||
|
||||
- **Data operations** - _Optional_. Select an aggregation or a macro from the drop-down. You can add multiple data operations by clicking the **+ sign**. Click the **garbage can icon** to remove data operations.
|
||||
- **Column** - Select a column on which to run the aggregation.
|
||||
- **Interval** - Select an interval from the drop-down. You'll see this option when you choose a `time group` macro from the drop-down.
|
||||
- **Fill** - _Optional_. Add a `FILL` method to populate missing time intervals with default values (such as NULL, 0, or a specified value) when no data exists for those intervals. This ensures continuity in the time series, avoiding gaps in visualizations.
|
||||
- **Alias** - _Optional_. Add an alias from the drop-down. You can also add your own alias by typing it in the box and clicking **Enter**. Remove an alias by clicking the **X**.
|
||||
|
||||
- **Filter** - Toggle to add filters.
|
||||
- **Filter by column value** - _Optional_. If you toggle **Filter** you can add a column to filter by from the drop-down. To filter by additional columns, click the **+ sign** to the right of the condition drop-down. You can choose a variety of operators from the drop-down next to the condition. When multiple filters are added, use the `AND` or `OR` operators to define how conditions are evaluated. `AND` requires all conditions to be true, while `OR` requires any condition to be true. Use the second drop-down to select the filter value. To remove a filter, click the **X icon** next to it. If you select a `date-type` column, you can use macros from the operator list and choose `timeFilter` to insert the `$\_\_timeFilter` macro into your query with the selected date column.
|
||||
|
||||
After selecting a date type column, you can choose Macros from the operators list and select timeFilter which will add the `$\_\_timeFilter` macro to the query with the selected date column. Refer to [Macros](#macros) for more information.
|
||||
|
||||
- **Group** - Toggle to add a `GROUP BY` column.
|
||||
- **Group by column** - Select a column to filter by from the drop-down. Click the **+sign** to filter by multiple columns. Click the **X** to remove a filter.
|
||||
- **Order** - Toggle to add an `ORDER BY` statement.
|
||||
- **Order by** - Select a column to order by from the drop-down. Select ascending (`ASC`) or descending (`DESC`) order.
|
||||
- **Limit** - You can add an optional limit on the number of retrieved results. Default is 50.
|
||||
- **Preview** - Toggle for a preview of the SQL query generated by the query builder. Preview is toggled on by default.
|
||||
|
||||
For additional detail about using formats, refer to [Table queries](#table-queries) and [Time series queries](#time-series-queries).
|
||||
|
||||
## Code mode
|
||||
|
||||
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
In **Code mode**, you can write complex queries using a text editor with autocompletion features and syntax highlighting.
|
||||
**Code mode** lets you build complex queries using a text editor with helpful features like autocompletion and syntax highlighting.
|
||||
|
||||
For more information about Transact-SQL (T-SQL), the query language used by Microsoft SQL Server, refer to the [Transact-SQL tutorial](https://learn.microsoft.com/en-us/sql/t-sql/tutorial-writing-transact-sql-statements).
|
||||
This mode is ideal for advanced users who need full control over the SQL query or want to use features not available in visual query mode. It’s especially useful for writing subqueries, using macros, or applying advanced filtering and formatting. You can switch back to visual mode, but note that some custom queries may not be fully compatible.
|
||||
|
||||
### Use toolbar features
|
||||
### Code mode toolbar features
|
||||
|
||||
Code mode has several features in a toolbar located in the editor's lower-right corner.
|
||||
|
||||
To reformat the query, click the brackets button (`{}`).
|
||||
|
||||
To expand the code editor, click the chevron button pointing downward.
|
||||
|
||||
To run the query, click the **Run query** button or use the keyboard shortcut <key>Ctrl</key>/<key>Cmd</key> + <key>Enter</key>/<key>Return</key>.
|
||||
- To reformat the query, click the brackets button (`{}`).
|
||||
- To expand the code editor, click the chevron button pointing downward.
|
||||
- To run the query, click the **Run query** button or use the keyboard shortcut **<key>Ctrl</key>/<key>Cmd</key> + <key>Enter</key>/<key>Return</key>**.
|
||||
|
||||
### Use autocompletion
|
||||
|
||||
@@ -105,94 +135,47 @@ To manually trigger autocompletion, use the keyboard shortcut <key>Ctrl</key>/<k
|
||||
|
||||
Code mode supports autocompletion of tables, columns, SQL keywords, standard SQL functions, Grafana template variables, and Grafana macros.
|
||||
|
||||
> **Note:** You can't autocomplete columns until you've specified a table.
|
||||
{{< admonition type="note" >}}
|
||||
You can't autocomplete columns until you've specified a table.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Builder mode
|
||||
|
||||
{{< figure src="/static/img/docs/v92/mssql_query_builder.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
In **Builder mode**, you can build queries using a visual interface.
|
||||
|
||||
### Dataset and table selection
|
||||
|
||||
In the **Dataset** dropdown, select the MSSQL database to query. Grafana populates the dropdown with all databases that the user can access.
|
||||
Once you select a database, Grafana populates the dropdown with all available tables.
|
||||
|
||||
**Note:** If a default database has been configured through the Data Source Configuration page (or through a provisioning configuration file), the user will only be able to use that single preconfigured database for querying.
|
||||
|
||||
We don't include `tempdb`,`model`,`msdb`,`master` databases in the query editor dropdown.
|
||||
|
||||
### Select columns and aggregation functions (SELECT)
|
||||
|
||||
Select a column from the **Column** dropdown to include it in the data.
|
||||
You can select an optional aggregation function for the column in the **Aggregation** dropdown.
|
||||
|
||||
To add more value columns, click the plus (`+`) button to the right of the column's row.
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/sql-query-builder-macros.md" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a filter, toggle the **Filter** switch at the top of the editor.
|
||||
This reveals a **Filter by column value** section with two dropdown selectors.
|
||||
|
||||
Use the first dropdown to choose whether all of the filters need to match (`AND`), or if only one of the filters needs to match (`OR`).
|
||||
Use the second dropdown to choose a filter.
|
||||
|
||||
To filter on more columns, click the plus (`+`) button to the right of the condition dropdown.
|
||||
|
||||
To remove a filter, click the `x` button next to that filter's dropdown.
|
||||
|
||||
After selecting a date type column, you can choose Macros from the operators list and select timeFilter which will add the $\_\_timeFilter macro to the query with the selected date column.
|
||||
|
||||
### Group results
|
||||
|
||||
To group results by column, toggle the **Group** switch at the top of the editor.
|
||||
This reveals a **Group by column** dropdown where you can select which column to group the results by.
|
||||
|
||||
To remove the group-by clause, click the `x` button.
|
||||
|
||||
### Preview the query
|
||||
|
||||
To preview the SQL query generated by Builder mode, toggle the **Preview** switch at the top of the editor.
|
||||
This reveals a preview pane containing the query, and an copy icon at the top right that copies the query to your clipboard.
|
||||
|
||||
## Use macros
|
||||
## Macros
|
||||
|
||||
To simplify syntax and to allow for dynamic components, such as date range filters, you can add macros to your query.
|
||||
|
||||
| Macro example | Replaced by |
|
||||
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `$__time(dateColumn)` | An expression to rename the column to _time_. For example, _dateColumn as time_ |
|
||||
| `$__timeEpoch(dateColumn)` | An expression to convert a DATETIME column type to Unix timestamp and rename it to _time_.<br/>For example, _DATEDIFF(second, '1970-01-01', dateColumn) AS time_ |
|
||||
| `$__timeFilter(dateColumn)` | A time range filter using the specified column name.<br/>For example, _dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'_ |
|
||||
| `$__timeFrom()` | The start of the currently active time selection. For example, _'2017-04-21T05:01:17Z'_ |
|
||||
| `$__timeTo()` | The end of the currently active time selection. For example, _'2017-04-21T05:06:17Z'_ |
|
||||
| `$__timeGroup(dateColumn,'5m'[, fillvalue])` | An expression usable in GROUP BY clause. Providing a _fillValue_ of _NULL_ or _floating value_ will automatically fill empty series in timerange with that value.<br/>For example, _CAST(ROUND(DATEDIFF(second, '1970-01-01', time_column)/300.0, 0) as bigint)\*300_. |
|
||||
| `$__timeGroup(dateColumn,'5m', 0)` | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. |
|
||||
| `$__timeGroup(dateColumn,'5m', NULL)` | Same as above but NULL will be used as value for missing points. |
|
||||
| `$__timeGroup(dateColumn,'5m', previous)` | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used. |
|
||||
| `$__timeGroupAlias(dateColumn,'5m')` | Same as `$__timeGroup` but with an added column alias. |
|
||||
| `$__unixEpochFilter(dateColumn)` | A time range filter using the specified column name with times represented as Unix timestamp. For example, _dateColumn > 1494410783 AND dateColumn < 1494497183_ |
|
||||
| `$__unixEpochFrom()` | The start of the currently active time selection as Unix timestamp. For example, _1494410783_ |
|
||||
| `$__unixEpochTo()` | The end of the currently active time selection as Unix timestamp. For example, _1494497183_ |
|
||||
| `$__unixEpochNanoFilter(dateColumn)` | A time range filter using the specified column name with times represented as nanosecond timestamp. For example, _dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872_ |
|
||||
| `$__unixEpochNanoFrom()` | The start of the currently active time selection as nanosecond timestamp. For example, _1494410783152415214_ |
|
||||
| `$__unixEpochNanoTo()` | The end of the currently active time selection as nanosecond timestamp. For example, _1494497183142514872_ |
|
||||
| `$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as `$__timeGroup` but for times stored as Unix timestamp. |
|
||||
| `$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as above but also adds a column alias. |
|
||||
Use macros in the `SELECT` clause to simplify the creation of time series queries.
|
||||
From the **Data operations** drop-down, choose a macro such as `$\_\_timeGroup` or `$\_\_timeGroupAlias`. Then, select a time column from the **Column** drop-down and a time interval from the **Interval** drop-down. This generates a time-series query based on your selected time grouping.
|
||||
|
||||
| **Macro** | **Description** |
|
||||
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `$__time(dateColumn)` | Renames the specified column to `_time`. <br/>Example: `dateColumn AS time` |
|
||||
| `$__timeEpoch(dateColumn)` | Converts a `DATETIME` column to a Unix timestamp and renames it to `_time`. <br/>Example: `DATEDIFF(second, '1970-01-01', dateColumn) AS time` |
|
||||
| `$__timeFilter(dateColumn)` | Adds a time range filter for the specified column. <br/>Example: `dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'` |
|
||||
| `$__timeFrom()` | Returns the start of the current time range. <br/>Example: `'2017-04-21T05:01:17Z'` |
|
||||
| `$__timeTo()` | Returns the end of the current time range. <br/>Example: `'2017-04-21T05:06:17Z'` |
|
||||
| `$__timeGroup(dateColumn, '5m'[, fillValue])` | Groups the specified time column into intervals (e.g., 5 minutes). Optionally fills gaps with a value like `0`, `NULL`, or `previous`. <br/>Example: `CAST(ROUND(DATEDIFF(second, '1970-01-01', time_column)/300.0, 0) AS bigint) * 300` |
|
||||
| `$__timeGroup(dateColumn, '5m', 0)` | Same as above, with `0` used to fill missing data points. |
|
||||
| `$__timeGroup(dateColumn, '5m', NULL)` | Same as above, with `NULL` used for missing data points. |
|
||||
| `$__timeGroup(dateColumn, '5m', previous)` | Same as above, using the previous value to fill gaps. If no previous value exists, `NULL` is used. |
|
||||
| `$__timeGroupAlias(dateColumn, '5m')` | Same as `$__timeGroup`, but also adds an alias to the resulting column. |
|
||||
| `$__unixEpochFilter(dateColumn)` | Adds a time range filter using Unix timestamps. <br/>Example: `dateColumn > 1494410783 AND dateColumn < 1494497183` |
|
||||
| `$__unixEpochFrom()` | Returns the start of the current time range as a Unix timestamp. <br/>Example: `1494410783` |
|
||||
| `$__unixEpochTo()` | Returns the end of the current time range as a Unix timestamp. <br/>Example: `1494497183` |
|
||||
| `$__unixEpochNanoFilter(dateColumn)` | Adds a time range filter using nanosecond-precision Unix timestamps. <br/>Example: `dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872` |
|
||||
| `$__unixEpochNanoFrom()` | Returns the start of the current time range as a nanosecond Unix timestamp. <br/>Example: `1494410783152415214` |
|
||||
| `$__unixEpochNanoTo()` | Returns the end of the current time range as a nanosecond Unix timestamp. <br/>Example: `1494497183142514872` |
|
||||
| `$__unixEpochGroup(dateColumn, '5m', [fillMode])` | Same as `$__timeGroup`, but for Unix timestamps. Optional `fillMode` controls how to handle missing points. |
|
||||
| `$__unixEpochGroupAlias(dateColumn, '5m', [fillMode])` | Same as above, but adds an alias to the grouped column. |
|
||||
|
||||
### View the interpolated query
|
||||
|
||||
The query editor also includes a link named **Generated SQL** that appears after running a query while in panel edit mode.
|
||||
To display the raw interpolated SQL string that the data source executed, click on this link.
|
||||
The query editor includes a **Generated SQL** link that appears after you run a query while editing a panel. Click this link to view the raw interpolated SQL that Grafana executed, including any macros that were expanded during query processing.
|
||||
|
||||
## Use table queries
|
||||
## Table queries
|
||||
|
||||
If the **Format** query option is set to **Table** for a [Table panel](ref:table), you can enter any type of SQL query.
|
||||
The Table panel then displays the query results with whatever columns and rows are returned.
|
||||
To create a Table query, set the **Format** option in the query editor to [**Table**](ref:table). This allows you to write any valid SQL query, and the Table panel will display the results using the returned columns and rows.
|
||||
|
||||
**Example database table:**
|
||||
**Example:**
|
||||
|
||||
```sql
|
||||
CREATE TABLE [event] (
|
||||
@@ -220,43 +203,43 @@ SELECT
|
||||
GETDATE(), CAST(GETDATE() AS DATETIME2), CAST(GETDATE() AS SMALLDATETIME), CAST(GETDATE() AS DATE), CAST(GETDATE() AS TIME), SWITCHOFFSET(CAST(GETDATE() AS DATETIMEOFFSET), '-07:00')
|
||||
```
|
||||
|
||||
Query editor with example query:
|
||||
|
||||
{{< figure src="/static/img/docs/v51/mssql_table_query.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
The query:
|
||||
**Example query with output:**
|
||||
|
||||
```sql
|
||||
SELECT * FROM [mssql_types]
|
||||
```
|
||||
|
||||
To control the name of the Table panel columns, use the standard `AS` SQL column selection syntax.
|
||||
{{< figure src="/static/img/docs/v51/mssql_table_query.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
For example:
|
||||
Use the keyword `AS` to define an alias in your query to rename a column or table.
|
||||
|
||||
**Example query with output:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
c_bit as [column1], c_tinyint as [column2]
|
||||
c_bit AS [column1], c_tinyint AS [column2]
|
||||
FROM
|
||||
[mssql_types]
|
||||
```
|
||||
|
||||
The resulting table panel:
|
||||
|
||||
{{< figure src="/static/img/docs/v51/mssql_table_result.png" max-width="1489px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Use time series queries
|
||||
## Time series queries
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Store timestamps in UTC to avoid issues with time shifts in Grafana when using non-UTC timezones.
|
||||
{{< /admonition >}}
|
||||
|
||||
If you set the **Format** setting in the query editor to **Time series**, then the query must have a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds.
|
||||
Result sets of time series queries must also be sorted by time for panels to properly visualize the result.
|
||||
To create a time series query, set the **Format** option in the query editor to **Time series**. The query must include a column named `time`, which should contain either a SQL `datetime` value or a numeric value representing Unix epoch time in seconds. The result set must be sorted by the `time` column for panels to visualize the data correctly.
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/key-concepts/data-frames#wide-format).
|
||||
Any column except time or of type string transforms into value fields in the data frame query result.
|
||||
Any string column transforms into field labels in the data frame query result.
|
||||
A time series query returns results[wide data frame format](https://grafana.com/developers/plugin-tools/key-concepts/data-frames#wide-format).
|
||||
|
||||
- Any column except `time` or of the type `string` transforms into value fields in the data frame query result.
|
||||
- Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
You can enable macro support in the `SELECT` clause to create time series queries more easily. Use the **Data operations** drop-down to choose a macro such as `$\_\_timeGroup` or `$\_\_timeGroupAlias`, then select a time column from the Column drop-down and a time interval from the Interval drop-down. This generates a time-series query based on your selected time grouping.
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/sql-query-builder-macros.md" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
### Create a metric query
|
||||
|
||||
@@ -294,7 +277,7 @@ Data frame result:
|
||||
|
||||
### Time series query examples
|
||||
|
||||
**Using the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
**Use the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -325,7 +308,7 @@ Data frame result:
|
||||
+---------------------+---------------------------+---------------------------+
|
||||
```
|
||||
|
||||
**Using multiple columns:**
|
||||
**Use multiple columns:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -354,16 +337,16 @@ Data frame result:
|
||||
## Apply annotations
|
||||
|
||||
[Annotations](ref:annotate-visualizations) overlay rich event information on top of graphs.
|
||||
You can add annotation queries in the Dashboard menu's Annotations view.
|
||||
You can add annotation queries in the Dashboard menu's **Annotations** view.
|
||||
|
||||
**Columns:**
|
||||
|
||||
| Name | Description |
|
||||
| --------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `time` | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. |
|
||||
| `timeend` | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. |
|
||||
| `text` | Event description field. |
|
||||
| `tags` | Optional field name to use for event tags as a comma separated string. |
|
||||
| `time` | The name of the date/time field. Can be a column with a native SQL date/time data type or epoch value. |
|
||||
| `timeend` | _Optional_ name of the end date/time field. Can be a column with a native SQL date/time data type or epoch value. |
|
||||
| `text` | Field containing the event description. |
|
||||
| `tags` | _Optional_ field used for event tags, formatted as a comma-separated string. |
|
||||
|
||||
**Example database tables:**
|
||||
|
||||
@@ -375,7 +358,7 @@ CREATE TABLE [events] (
|
||||
)
|
||||
```
|
||||
|
||||
We also use the database table defined in [Time series queries](#time-series-queries).
|
||||
The following example also uses the database table defined in the [Time series queries](#time-series-queries) section.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
@@ -422,16 +405,17 @@ ORDER BY 1
|
||||
|
||||
## Use stored procedures
|
||||
|
||||
Stored procedures have been verified to work.
|
||||
However, please note that we haven't done anything special to support this, so there might be edge cases where it won't work as you would expect.
|
||||
Stored procedures should be supported in table, time series and annotation queries as long as you use the same naming of columns and return data in the same format as describe above under respective section.
|
||||
Stored procedures have been verified to work with Grafana queries. However, note that there is no special handling or extended support for stored procedures, so some edge cases may not behave as expected.
|
||||
|
||||
Please note that any macro function will not work inside a stored procedure.
|
||||
Stored procedures can be used in table, time series, and annotation queries, provided that the returned data matches the expected column names and formats described in the relevant previous sections in this document.
|
||||
|
||||
### Examples
|
||||
{{< admonition type="note" >}}
|
||||
Grafana macro functions do not work inside stored procedures.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< figure src="/static/img/docs/v51/mssql_metrics_graph.png" class="docs-image--no-shadow docs-image--right" >}}
|
||||
For the following examples, the database table is defined in [Time series queries](#time-series-queries). Let's say that we want to visualize four series in a graph panel, such as all combinations of columns `valueOne`, `valueTwo` and `measurement`. Graph panel to the right visualizes what we want to achieve. To solve this, we need to use two queries:
|
||||
|
||||
For the following examples, the database table is defined in [Time series queries](#time-series-queries). Let's say that we want to visualize four series in a graph panel, such as all combinations of columns `valueOne`, `valueTwo` and `measurement`. Graph panel to the right visualizes what we want to achieve. To solve this, you need to use two queries:
|
||||
|
||||
**First query:**
|
||||
|
||||
@@ -465,14 +449,13 @@ GROUP BY
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
#### Stored procedure using time in epoch format
|
||||
### Stored procedure with epoch time format
|
||||
|
||||
We can define a stored procedure that will return all data we need to render 4 series in a graph panel like above.
|
||||
In this case the stored procedure accepts two parameters `@from` and `@to` of `int` data types which should be a timerange (from-to) in epoch format
|
||||
which will be used to filter the data to return from the stored procedure.
|
||||
You can define a stored procedure to return all the data needed to render multiple series (for example, 4) in a graph panel.
|
||||
|
||||
We're mimicking the `$__timeGroup(time, '5m')` in the select and group by expressions, and that's why there are a lot of lengthy expressions needed -
|
||||
these could be extracted to MS SQL functions, if wanted.
|
||||
In the following example, the stored procedure accepts two parameters, `@from` and `@to`, both of type `int`. These parameters represent a time range (from–to) in epoch time format and are used to filter the results returned by the procedure.
|
||||
|
||||
The query inside the procedure simulates the behavior of `$__timeGroup(time, '5m')` by grouping timestamps into 5-minute intervals. While the expressions for time grouping are somewhat verbose, they can be extracted into reusable SQL Server functions to simplify the procedure.
|
||||
|
||||
```sql
|
||||
CREATE PROCEDURE sp_test_epoch(
|
||||
@@ -507,7 +490,7 @@ BEGIN
|
||||
END
|
||||
```
|
||||
|
||||
Then we can use the following query for our graph panel.
|
||||
Then, in your graph panel, you can use the following query to call the stored procedure with the time range dynamically populated by Grafana:
|
||||
|
||||
```sql
|
||||
DECLARE
|
||||
@@ -517,14 +500,15 @@ DECLARE
|
||||
EXEC dbo.sp_test_epoch @from, @to
|
||||
```
|
||||
|
||||
#### Stored procedure using time in datetime format
|
||||
This uses Grafana built-in macros to convert the selected time range into epoch time ($**unixEpochFrom() and $**unixEpochTo()), which are passed to the stored procedure as input parameters.
|
||||
|
||||
We can define a stored procedure that will return all data we need to render 4 series in a graph panel like above.
|
||||
In this case the stored procedure accepts two parameters `@from` and `@to` of `datetime` data types which should be a timerange (from-to)
|
||||
which will be used to filter the data to return from the stored procedure.
|
||||
### Stored procedure with `datetime` format
|
||||
|
||||
We're mimicking the `$__timeGroup(time, '5m')` in the select and group by expressions and that's why there's a lot of lengthy expressions needed -
|
||||
these could be extracted to MS SQL functions, if wanted.
|
||||
You can define a stored procedure to return all the data needed to render four series in a graph panel.
|
||||
|
||||
In the following example, the stored procedure accepts two parameters, `@from` and `@to`, of the type `datetime`. These parameters represent the selected time range and are used to filter the returned data.
|
||||
|
||||
The query within the procedure mimics the behavior of `$__timeGroup(time, '5m')` by grouping data into 5-minute intervals. These expressions can be verbose, but you may extract them into reusable SQL Server functions for improved readability and maintainability.
|
||||
|
||||
```sql
|
||||
CREATE PROCEDURE sp_test_datetime(
|
||||
@@ -560,7 +544,7 @@ END
|
||||
|
||||
```
|
||||
|
||||
Then we can use the following query for our graph panel.
|
||||
To call this stored procedure from a graph panel, use the following query with Grafana built-in macros to populate the time range dynamically:
|
||||
|
||||
```sql
|
||||
DECLARE
|
||||
|
||||
@@ -40,50 +40,60 @@ refs:
|
||||
# Microsoft SQL Server template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
Grafana displays these variables in drop-down select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as **template variables**.
|
||||
|
||||
For an introduction to templating and template variables, refer to the [Templating](ref:variables) and [Add and manage variables](ref:add-template-variables) documentation.
|
||||
For general information on using variables in Grafana, refer to [Add variables](ref:add-template-variables).
|
||||
|
||||
For an introduction to templating and template variables, refer to [Templating](ref:variables) and [Add and manage variables](ref:add-template-variables).
|
||||
|
||||
## Query variable
|
||||
|
||||
If you add a template variable of the type `Query`, you can write a MS SQL query that can
|
||||
return things like measurement names, key names or key values that are shown as a dropdown select box.
|
||||
A query variable in Grafana dynamically retrieves values from your data source using a query. With a query variable, you can write a SQL query that returns values such as measurement names, key names, or key values that are shown in a drop-down select box.
|
||||
|
||||
For example, you can have a variable that contains all values for the `hostname` column in a table if you specify a query like this in the templating variable **Query** setting.
|
||||
For example, the following query returns all values from the `hostname` column:
|
||||
|
||||
```sql
|
||||
SELECT hostname FROM host
|
||||
```
|
||||
|
||||
A query can return multiple columns and Grafana will automatically create a list from them. For example, the query below will return a list with values from `hostname` and `hostname2`.
|
||||
A query can return multiple columns, and Grafana automatically generates a list using the values from those columns. For example, the following query returns values from both the `hostname` and `hostname2` columns, which are included in the variable's drop-down list.
|
||||
|
||||
```sql
|
||||
SELECT [host].[hostname], [other_host].[hostname2] FROM host JOIN other_host ON [host].[city] = [other_host].[city]
|
||||
```
|
||||
|
||||
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allow you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
|
||||
You can also create a key/value variable using a query that returns two columns named `__text` and `__value`.
|
||||
|
||||
- The `__text` column defines the label shown in the drop-down.
|
||||
|
||||
- The `__value` column defines the value passed to panel queries.
|
||||
|
||||
This is useful when you want to display a user-friendly label (like a hostname) but use a different underlying value (like an ID).
|
||||
|
||||
Note that the values in the `_text` column should be unique. If there are duplicates, Grafana uses only the first matching entry.
|
||||
|
||||
```sql
|
||||
SELECT hostname __text, id __value FROM host
|
||||
```
|
||||
|
||||
You can also create nested variables. For example, if you had another variable named `region`. Then you could have
|
||||
the hosts variable only show hosts from the current selected region with a query like this (if `region` is a multi-value variable, then use the `IN` comparison operator rather than `=` to match against multiple values):
|
||||
You can also create nested variables, where one variable depends on the value of another. For example, if you have a variable named `region`, you can configure a `hosts` variable to only show hosts from the selected region. If `region` is a multi-value variable, use the `IN` operator instead of `=` to match against multiple selected values.
|
||||
|
||||
```sql
|
||||
SELECT hostname FROM host WHERE region IN ($region)
|
||||
```
|
||||
|
||||
## Using variables in queries
|
||||
## Use variables in queries
|
||||
|
||||
> Template variable values are only quoted when the template variable is a `multi-value`.
|
||||
Grafana automatically quotes template variable values only when the template variable is a `multi-value`.
|
||||
|
||||
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||
When using a multi-value variable, use the `IN` comparison operator instead of `=` to match against multiple values.
|
||||
|
||||
There are two syntaxes:
|
||||
Grafana supports two syntaxes for using variables in queries:
|
||||
|
||||
`$<varname>` Example with a template variable named `hostname`:
|
||||
- **`$<varname>` syntax**
|
||||
|
||||
Example with a template variable named `hostname`:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -94,7 +104,9 @@ WHERE $__timeFilter(atimestamp) and hostname in($hostname)
|
||||
ORDER BY atimestamp
|
||||
```
|
||||
|
||||
`[[varname]]` Example with a template variable named `hostname`:
|
||||
- **`[[varname]]` syntax**
|
||||
|
||||
Example with a template variable named `hostname`:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -105,10 +117,14 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
|
||||
ORDER BY atimestamp
|
||||
```
|
||||
|
||||
### Disabling Quoting for Multi-value Variables
|
||||
### Disable quoting for multi-value variables
|
||||
|
||||
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. To disable quoting, use the csv formatting option for variables:
|
||||
By default, Grafana formats multi-value variables as a quoted, comma-separated string. For example, if `server01` and `server02` are selected, the result will be `'server01'`, `'server02'`. To disable quoting, use the `csv` formatting option for variables:
|
||||
|
||||
`${servers:csv}`
|
||||
```text
|
||||
${servers:csv}
|
||||
```
|
||||
|
||||
Read more about variable formatting options in the [Variables](ref:variable-syntax-advanced-variable-format-options) documentation.
|
||||
This outputs the values as an unquoted comma-separated list.
|
||||
|
||||
Refer to [Advanced variable format options](ref:variable-syntax-advanced-variable-format-options) for additional information.
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
aliases:
|
||||
- ../data-sources/mysql/
|
||||
- ../features/datasources/mysql/
|
||||
description: introduction to the MySQL data source in Grafana
|
||||
description: Introduction to the MySQL data source in Grafana
|
||||
keywords:
|
||||
- grafana
|
||||
- mysql
|
||||
- data source
|
||||
- guide
|
||||
labels:
|
||||
products:
|
||||
@@ -45,7 +46,7 @@ refs:
|
||||
|
||||
# MySQL data source
|
||||
|
||||
Grafana ships with a built-in MySQL data source plugin that allows you to query and visualize data from a MySQL-compatible database like MariaDB or Percona Server. You don't need to install a plugin in order to add the MySQL data source to your Grafana instance.
|
||||
Grafana ships with a built-in MySQL data source plugin that allows you to query and visualize data from a MySQL-compatible database like [MariaDB](https://mariadb.org/) or [Percona Server](https://www.percona.com/). You don't need to install a plugin in order to add the MySQL data source to your Grafana instance.
|
||||
|
||||
Grafana offers several configuration options for this data source as well as a visual and code-based query editor.
|
||||
|
||||
|
||||
@@ -45,10 +45,14 @@ This document provides instructions for configuring the MySQL data source and ex
|
||||
You must have the `Organization administrator` role in order to configure the MySQL data source.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
Grafana ships with the MySQL plugin, so no additional installation is required.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
When adding a data source, ensure the database user you specify has only `SELECT` permissions on the relevant database and tables. Grafana does not validate the safety of queries, which means they can include potentially harmful SQL statements, such as `USE otherdb;` or `DROP TABLE user;`, which could get executed. To minimize this risk, Grafana strongly recommends creating a dedicated MySQL user with restricted permissions.
|
||||
Grafana ships with the MySQL data source by default, so no additional installation is required.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition type="caution" >}}
|
||||
When adding a data source, ensure the database user you specify has only `SELECT` permissions on the relevant database and tables. Grafana does not validate the safety of queries, which means they can include potentially harmful SQL statements, such as `USE otherdb;` or `DROP TABLE user;`, which could get executed.
|
||||
|
||||
To minimize this risk, Grafana strongly recommends creating a dedicated MySQL user with restricted permissions.
|
||||
{{< /admonition >}}
|
||||
|
||||
Example:
|
||||
@@ -81,7 +85,7 @@ Following is a list of MySQL configuration options:
|
||||
|
||||
**Connection:**
|
||||
|
||||
- **Host URL** - Enter the IP address/hostname and optional port of your MySQL instance. If the port is omitted the default 3306 port will be used.
|
||||
- **Host URL** - Enter the IP address/hostname and optional port of your MySQL instance. If the port is omitted the default `3306` port will be used.
|
||||
- **Database** - Enter the name of your MySQL database.
|
||||
|
||||
**Authentication:**
|
||||
|
||||
@@ -58,6 +58,9 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
|
||||
configure-standard-options:
|
||||
- pattern: /docs/grafana/
|
||||
- destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-standard-options/
|
||||
---
|
||||
|
||||
# MySQL query editor
|
||||
@@ -125,26 +128,26 @@ Changes made to a query in Code mode will not transfer to Builder mode and will
|
||||
|
||||
You can add macros to your queries to simplify the syntax and enable dynamic elements, such as date range filters.
|
||||
|
||||
| Macro example | Description |
|
||||
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `$__time(dateColumn)` | Replaces the value with an expression to convert to a UNIX timestamp and renames the column to `time_sec`. Example: _UNIX_TIMESTAMP(dateColumn) AS time_sec_. |
|
||||
| `$__timeEpoch(dateColumn)` | Replaces the value with an expression to convert to a UNIX Epoch timestamp and renames the column to `time_sec`. Example: _UNIX_TIMESTAMP(dateColumn) AS time_sec_. |
|
||||
| `$__timeFilter(dateColumn)` | Replaces the value a time range filter using the specified column name. Example: _dateColumn BETWEEN FROM_UNIXTIME(1494410783) AND FROM_UNIXTIME(1494410983)_ |
|
||||
| `$__timeFrom()` | Replaces the value with the start of the currently active time selection. Example: _FROM_UNIXTIME(1494410783)_ |
|
||||
| `$__timeTo()` | Replaces the value with the end of the currently active time selection. Example: _FROM_UNIXTIME(1494410983)_ |
|
||||
| `$__timeGroup(dateColumn,'5m')` | Replaces the value with an expression suitable for use in a GROUP BY clause. Example: *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),\* |
|
||||
| `$__timeGroup(dateColumn,'5m', 0)` | Same as the `$__timeGroup(dateColumn,'5m')` macro, but includes a fill parameter to ensure missing points in the series are added by Grafana, using 0 as the default value. **This applies only to time series queries.** |
|
||||
| `$__timeGroup(dateColumn,'5m', NULL)` | Same as the `$__timeGroup(dateColumn,'5m', 0)` but NULL is used as the value for missing points. **This applies only to time series queries.** |
|
||||
| `$__timeGroup(dateColumn,'5m', previous)` | Same as the `$__timeGroup(dateColumn,'5m', previous)` macro, but uses the previous value in the series as the fill value. If no previous value exists,`NULL` will be used. **This applies only to time series queries.** |
|
||||
| `$__timeGroupAlias(dateColumn,'5m')` | Replaces the value identical to $\_\_timeGroup but with an added column alias. |
|
||||
| `$__unixEpochFilter(dateColumn)` | Replaces the value by a time range filter using the specified column name with times represented as a UNIX timestamp. Example: _dateColumn > 1494410783 AND dateColumn < 1494497183_ |
|
||||
| `$__unixEpochFrom()` | Replaces the value with the start of the currently active time selection as a UNIX timestamp. Example: _1494410783_ |
|
||||
| `$__unixEpochTo()` | Replaces the value with the end of the currently active time selection as UNIX timestamp. Example: _1494497183_ |
|
||||
| `$__unixEpochNanoFilter(dateColumn)` | Replaces the value with a time range filter using the specified column name with time represented as a nanosecond timestamp. Example: _dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872_ |
|
||||
| `$__unixEpochNanoFrom()` | Replaces the value with the start of the currently active time selection as nanosecond timestamp. Example: _1494410783152415214_ |
|
||||
| `$__unixEpochNanoTo()` | Replaces the value with the end of the currently active time selection as nanosecond timestamp. Example: _1494497183142514872_ |
|
||||
| `$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as $\_\_timeGroup but for times stored as Unix timestamp. **Note that `fillMode` only works with time series queries.** |
|
||||
| `$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as $\_\_timeGroup but also adds a column alias. **Note that `fillMode` only works with time series queries.** |
|
||||
| Macro example | Description |
|
||||
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `$__time(dateColumn)` | Replaces the value with an expression to convert to a UNIX timestamp and renames the column to `time_sec`. It also helps to recognize the `time` column, as required in Time Series format. Example: _UNIX_TIMESTAMP(dateColumn) AS time_sec_. |
|
||||
| `$__timeEpoch(dateColumn)` | Replaces the value with an expression to convert to a UNIX Epoch timestamp and renames the column to `time_sec`. Example: _UNIX_TIMESTAMP(dateColumn) AS time_sec_. |
|
||||
| `$__timeFilter(dateColumn)` | Applies a time range filter using the specified column name and fetches only the data that falls within that range. Example: _dateColumn BETWEEN FROM_UNIXTIME(1494410783) AND FROM_UNIXTIME(1494410983)_ |
|
||||
| `$__timeFrom()` | Replaces the value with the start of the currently active time selection. Example: _FROM_UNIXTIME(1494410783)_ |
|
||||
| `$__timeTo()` | Replaces the value with the end of the currently active time selection. Example: _FROM_UNIXTIME(1494410983)_ |
|
||||
| `$__timeGroup(dateColumn,'5m')` | Replaces the value with an expression suitable for use in a GROUP BY clause and creates the bucket timestamps at a fixed interval. Example: *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),\* |
|
||||
| `$__timeGroup(dateColumn,'5m', 0)` | Same as the `$__timeGroup(dateColumn,'5m')` macro, but includes a fill parameter to ensure missing points in the series are added by Grafana, using 0 as the default value. **This applies only to time series queries.** |
|
||||
| `$__timeGroup(dateColumn,'5m', NULL)` | Same as the `$__timeGroup(dateColumn,'5m', 0)` but NULL is used as the value for missing points. **This applies only to time series queries.** |
|
||||
| `$__timeGroup(dateColumn,'5m', previous)` | Same as the `$__timeGroup(dateColumn,'5m', previous)` macro, but uses the previous value in the series as the fill value. If no previous value exists,`NULL` will be used. **This applies only to time series queries.** |
|
||||
| `$__timeGroupAlias(dateColumn,'5m')` | Replaces the value identical to $\_\_timeGroup but with an added column alias. |
|
||||
| `$__unixEpochFilter(dateColumn)` | Replaces the value by a time range filter using the specified column name with times represented as a UNIX timestamp. Example: _dateColumn > 1494410783 AND dateColumn < 1494497183_ |
|
||||
| `$__unixEpochFrom()` | Replaces the value with the start of the currently active time selection as a UNIX timestamp. Example: _1494410783_ |
|
||||
| `$__unixEpochTo()` | Replaces the value with the end of the currently active time selection as UNIX timestamp. Example: _1494497183_ |
|
||||
| `$__unixEpochNanoFilter(dateColumn)` | Replaces the value with a time range filter using the specified column name with time represented as a nanosecond timestamp. Example: _dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872_ |
|
||||
| `$__unixEpochNanoFrom()` | Replaces the value with the start of the currently active time selection as nanosecond timestamp. Example: _1494410783152415214_ |
|
||||
| `$__unixEpochNanoTo()` | Replaces the value with the end of the currently active time selection as nanosecond timestamp. Example: _1494497183142514872_ |
|
||||
| `$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as $\_\_timeGroup but for times stored as Unix timestamp. **Note that `fillMode` only works with time series queries.** |
|
||||
| `$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as $\_\_timeGroup but also adds a column alias. **Note that `fillMode` only works with time series queries.** |
|
||||
|
||||
## Table SQL queries
|
||||
|
||||
@@ -180,106 +183,127 @@ The examples in this section refer to the data in the following table:
|
||||
+---------------------+--------------+---------------------+----------+
|
||||
| time_date_time | value_double | CreatedAt | hostname |
|
||||
+---------------------+--------------+---------------------+----------+
|
||||
| 2020-01-02 03:05:00 | 3.0 | 2020-01-02 03:05:00 | 10.0.1.1 |
|
||||
| 2020-01-02 03:06:00 | 4.0 | 2020-01-02 03:06:00 | 10.0.1.2 |
|
||||
| 2020-01-02 03:10:00 | 6.0 | 2020-01-02 03:10:00 | 10.0.1.1 |
|
||||
| 2020-01-02 03:11:00 | 7.0 | 2020-01-02 03:11:00 | 10.0.1.2 |
|
||||
| 2020-01-02 03:20:00 | 5.0 | 2020-01-02 03:20:00 | 10.0.1.2 |
|
||||
| 2025-01-02 03:05:00 | 3.0 | 2025-01-02 03:05:00 | 10.0.1.1 |
|
||||
| 2025-01-02 03:06:00 | 4.0 | 2025-01-02 03:06:00 | 10.0.1.2 |
|
||||
| 2025-01-02 03:10:00 | 6.0 | 2025-01-02 03:10:00 | 10.0.1.1 |
|
||||
| 2025-01-02 03:11:00 | 7.0 | 2025-01-02 03:11:00 | 10.0.1.2 |
|
||||
| 2025-01-02 03:20:00 | 5.0 | 2025-01-02 03:20:00 | 10.0.1.2 |
|
||||
+---------------------+--------------+---------------------+----------+
|
||||
```
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/key-concepts/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
For backward compatibility, an exception to the aforementioned rule applies to queries returning three columns, including a string column named `metric`. Instead of converting the metric column into field labels, it is used as the field name, and the series name is set to the value of the metric column. Refer to the following example with a metric column.
|
||||
{{< /admonition >}}
|
||||
|
||||
**Example with `metric` column:**
|
||||
**Example with `$__time(dateColumn)` Macro:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__time(time_date_time),
|
||||
value_double
|
||||
FROM my_data
|
||||
ORDER BY time_date_time
|
||||
```
|
||||
|
||||
Table panel result:
|
||||
|
||||
{{< figure alt="output of time macro" src="/media/docs/grafana/data-sources/mysql/screenshot-time-and-timefilter-macro.png" >}}
|
||||
|
||||
In the following example, the result includes two columns, `Time` and `value_double`, which represent the data associated with fixed timestamps. This query does not apply a time range filter and returns all rows from the table.
|
||||
|
||||
**Example with `$__timeFilter(dateColumn)` Macro:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__time(time_date_time),
|
||||
value_double
|
||||
FROM my_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
ORDER BY time_date_time
|
||||
```
|
||||
|
||||
Table panel result:
|
||||
|
||||
{{< figure alt="output of time filter macro" src="/media/docs/grafana/data-sources/mysql/screenshot-time-and-timefilter-macro.png" >}}
|
||||
|
||||
This example returns the same result as the previous one, but adds support for filtering data using the Grafana time picker.
|
||||
|
||||
**Example with `$__timeGroup(dateColumn,'5m')` Macro:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time, '5m') AS time,
|
||||
sum(value_double) AS sum_value
|
||||
FROM my_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
GROUP BY time
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Table panel result:
|
||||
|
||||
{{< figure alt="output of time group macro" src="/media/docs/grafana/data-sources/mysql/screenshot-timegroup-macro.png" >}}
|
||||
|
||||
Given the result in the following example, the data is grouped and aggregated within buckets with timestamps of fixed interval i.e. 5 mins. To customize the default series name formatting (optional), refer to [Standard options definitions](ref:configure-standard-options).
|
||||
|
||||
**Example with `$__timeGroupAlias(dateColumn,'5m')` Macro:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroupAlias(time_date_time,'5m'),
|
||||
min(value_double),
|
||||
'min' as metric
|
||||
FROM test_data
|
||||
FROM my_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
GROUP BY time
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Data frame result:
|
||||
Table panel result:
|
||||
|
||||
```text
|
||||
+---------------------+-----------------+
|
||||
| Name: time | Name: min |
|
||||
| Labels: | Labels: |
|
||||
| Type: []time.Time | Type: []float64 |
|
||||
+---------------------+-----------------+
|
||||
| 2020-01-02 03:05:00 | 3 |
|
||||
| 2020-01-02 03:10:00 | 6 |
|
||||
| 2020-01-02 03:20:00 | 5 |
|
||||
+---------------------+-----------------+
|
||||
```
|
||||
{{< figure alt="output of time group alias macro" src="/media/docs/grafana/data-sources/mysql/screenshot-timeGroupAlias-macro.png" >}}
|
||||
|
||||
To customize the default series name formatting (optional), refer to [Standard options definitions](ref:configure-standard-options-display-name).
|
||||
The following result is similar to the result of the `$__timeGroup(dateColumn,'5m')` macro, except it uses a built-in alias for the time column.
|
||||
To customize the default series name formatting (optional), refer to [Standard options definitions](ref:configure-standard-options).
|
||||
|
||||
**Example using the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
**Example with `$__timeGroupAlias` Macro to convert null values to zero instead:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroupAlias(createdAt,'5m',0),
|
||||
sum(value_double) as value,
|
||||
hostname
|
||||
FROM test_data
|
||||
FROM my_data
|
||||
WHERE
|
||||
$__timeFilter(createdAt)
|
||||
GROUP BY time, hostname
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions](ref:configure-standard-options-display-name) display value of `${__field.labels.hostname}`.
|
||||
Table panel result:
|
||||
|
||||
Data frame result:
|
||||
{{< figure alt="output of null values to zero case, for time group alias macro" src="/media/docs/grafana/data-sources/mysql/screenshot-timeGroupAlias-macro-conv-null-to-zero.png" >}}
|
||||
|
||||
```text
|
||||
+---------------------+---------------------------+---------------------------+
|
||||
| Name: time | Name: value | Name: value |
|
||||
| Labels: | Labels: hostname=10.0.1.1 | Labels: hostname=10.0.1.2 |
|
||||
| Type: []time.Time | Type: []float64 | Type: []float64 |
|
||||
+---------------------+---------------------------+---------------------------+
|
||||
| 2020-01-02 03:05:00 | 3 | 4 |
|
||||
| 2020-01-02 03:10:00 | 6 | 7 |
|
||||
| 2020-01-02 03:15:00 | 0 | 0 |
|
||||
| 2020-01-02 03:20:00 | 0 | 5 |
|
||||
+---------------------+---------------------------+---------------------------+
|
||||
```
|
||||
Given the result in the following example, null values within bucket timestamps are replaced by zero and also add the `Time` column alias by default. To customize the default series name formatting (optional), refer to [Standard options definitions](ref:configure-standard-options) to display the value of `${__field.labels.hostname}`.
|
||||
|
||||
**Example with multiple columns:**
|
||||
**Example with multiple columns for `$__timeGroupAlias(dateColumn,'5m')` Macro:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroupAlias(time_date_time,'5m'),
|
||||
min(value_double) as min_value,
|
||||
max(value_double) as max_value
|
||||
FROM test_data
|
||||
FROM my_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
GROUP BY time
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Data frame result:
|
||||
Table panel result:
|
||||
|
||||
```text
|
||||
+---------------------+-----------------+-----------------+
|
||||
| Name: time | Name: min_value | Name: max_value |
|
||||
| Labels: | Labels: | Labels: |
|
||||
| Type: []time.Time | Type: []float64 | Type: []float64 |
|
||||
+---------------------+-----------------+-----------------+
|
||||
| 2020-01-02 03:05:00 | 3 | 4 |
|
||||
| 2020-01-02 03:10:00 | 6 | 7 |
|
||||
| 2020-01-02 03:20:00 | 5 | 5 |
|
||||
+---------------------+-----------------+-----------------+
|
||||
```
|
||||
{{< figure alt="output with multiple colummns for time group alias macro" src="/media/docs/grafana/data-sources/mysql/screenshot-timeGroupAlias-macro-multiple-columns.png" >}}
|
||||
|
||||
The query returns multiple columns representing minimum and maximum values within the defined range.
|
||||
|
||||
## Templating
|
||||
|
||||
@@ -392,6 +416,21 @@ WHERE
|
||||
$__unixEpochFilter(epoch_time)
|
||||
```
|
||||
|
||||
You may use one or more tags to show them as annotations in a common-separate string.
|
||||
|
||||
**Example query using a `time` column with epoch values for a single tag:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
epoch_time as time,
|
||||
metric1 as text,
|
||||
tag1 as tag
|
||||
FROM
|
||||
my_data
|
||||
WHERE
|
||||
$__unixEpochFilter(epoch_time)
|
||||
```
|
||||
|
||||
**Example region query using `time` and `timeend` columns with epoch values:**
|
||||
|
||||
```sql
|
||||
|
||||
@@ -568,8 +568,6 @@ Gets a dashboard via the dashboard uid.
|
||||
- namespace: to read more about the namespace to use, see the [API overview](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/apis/).
|
||||
- uid: the unique identifier of the dashboard to update. this will be the _name_ in the dashboard response
|
||||
|
||||
Note: For large dashboards, add `/dto` to the end of the URL to get the full dashboard body.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#dashboard-api" >}}) for an explanation.
|
||||
|
||||
@@ -19,7 +19,7 @@ To learn more about Grafana Enterprise, refer to [our product page](/enterprise)
|
||||
|
||||
## Enterprise features in Grafana Cloud
|
||||
|
||||
Many Grafana Enterprise features are also available in [Grafana Cloud](/docs/grafana-cloud) Free, Pro, and Advanced accounts. For details, refer to [Grafana Cloud pricing](/pricing/#featuresTable).
|
||||
Many Grafana Enterprise features are also available in paid [Grafana Cloud](/docs/grafana-cloud) accounts. For details, refer to [Grafana Cloud features](/docs/grafana-cloud/introduction/understand-grafana-cloud-features/). For pricing and plans, refer to [Grafana Cloud pricing](https://grafana.com/pricing/).
|
||||
|
||||
To migrate to Grafana Cloud, refer to [Migrate from Grafana Enterprise to Grafana Cloud](/docs/grafana/<GRAFANA_VERSION>/administration/migration-guide/)
|
||||
|
||||
|
||||
@@ -270,6 +270,14 @@ You can enable infinite panning in a canvas when pan and zoom is enabled. This a
|
||||
Infinite panning is an experimental feature that may not work as expected in all scenarios. For example, elements that are not top-left constrained may experience unexpected movement when panning.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Tooltip options
|
||||
|
||||
The **Tooltip mode** setting controls the display of tooltips when hovering over canvas elements that are connected to data, data links, or actions.
|
||||
The options are:
|
||||
|
||||
- **Enabled** - Show a tooltip when the cursor hovers over an element.
|
||||
- **Disabled** - Tooltips are not shown on hover.
|
||||
|
||||
### Layer options
|
||||
|
||||
The **Layer** options let you add elements to the canvas and control its appearance:
|
||||
|
||||
@@ -236,11 +236,11 @@ If you want to apply a cell type to only some fields instead of all fields, you
|
||||
| Cell type | Description |
|
||||
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [Auto](#auto) | A basic text and number cell. |
|
||||
| [Sparkline](#sparkline) | Shows values rendered as a sparkline. |
|
||||
| [Colored text](#colored-text) | If thresholds, value mappings, or color schemes are set, then the cell text is displayed in the appropriate color. |
|
||||
| [Colored background](#colored-background) | If thresholds, value mappings, or color schemes are set, then the cell background is displayed in the appropriate color. |
|
||||
| [Gauge](#gauge) | Values are displayed as a horizontal bar gauge. You can set the [Gauge display mode](#gauge-display-mode) and the [Value display](#value-display) options. |
|
||||
| Data links | If you've configured data links, when the cell type is **Auto**, the cell text becomes clickable. If you change the cell type to **Data links**, the cell text reflects the titles of the configured data links. To control the application of data link text more granularly, use a **Cell option > Cell type > Data links** field override. |
|
||||
| [Gauge](#gauge) | Values are displayed as a horizontal bar gauge. You can set the [Gauge display mode](#gauge-display-mode) and the [Value display](#value-display) options. |
|
||||
| [Sparkline](#sparkline) | Shows values rendered as a sparkline. |
|
||||
| [JSON View](#json-view) | Shows values formatted as code. |
|
||||
| [Image](#image) | Displays an image when the value is a URL or a base64 encoded image. |
|
||||
| [Actions](#actions) | The cell displays a button that triggers a basic, unauthenticated API call when clicked. |
|
||||
@@ -254,32 +254,6 @@ It has the following cell options:
|
||||
|
||||
{{< docs/shared lookup="visualizations/cell-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
#### Sparkline
|
||||
|
||||
This cell type shows values rendered as a sparkline.
|
||||
To show sparklines on data with multiple time series, use the [Time series to table transformation](ref:time-series-to-table-transformation) to process it into a format the table can show.
|
||||
|
||||

|
||||
|
||||
The sparkline cell type options are described in the following table.
|
||||
For more detailed information about all of the sparkline styling options (except **Hide value**), refer to the [time series graph styles documentation](ref:graph-styles).
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| Hide value | Toggle the switch on or off to display or hide the cell value on the sparkline. |
|
||||
| Style | Choose whether to display your time-series data as **Lines**, **Bars**, or **Points**. You can use overrides to combine multiple styles in the same graph. |
|
||||
| Line interpolation | How the graph interpolates the series line. Choose from:<ul><li>**Linear** - Points are joined by straight lines.</li><li>**Smooth** - Points are joined by curved lines that smooths transitions between points.</li><li>**Step before** - The line is displayed as steps between points. Points are rendered at the end of the step.</li><li>**Step after** - The line is displayed as steps between points. Points are rendered at the beginning of the step.</li></ul> |
|
||||
| Line width | The thickness of the series lines or the outline for bars using the **Line width** slider. |
|
||||
| Fill opacity | The series area fill color using the **Fill opacity** slider. |
|
||||
| Gradient mode | Gradient mode controls the gradient fill, which is based on the series color. Gradient appearance is influenced by the **Fill opacity** setting. To change the color, use the standard color scheme field option. For more information, refer to [Color scheme](ref:color-scheme). Choose from:<ul><li>**None** - No gradient fill. This is the default setting.</li><li>**Opacity** - An opacity gradient where the opacity of the fill increases as y-axis values increase.</li><li>**Hue** - A subtle gradient that's based on the hue of the series color.</li></ul> |
|
||||
| Line style | Choose from:<ul><li>**Solid**</li><li>**Dash** - Select the length and gap for the line dashes. Default dash spacing is 10, 10.</li><li>**Dots** - Select the gap for the dot spacing. Default dot spacing is 0, 10.</li></ul> |
|
||||
| Connect null values | How null values, which are gaps in the data, appear on the graph. Null values can be connected to form a continuous line or set to a threshold above which gaps in the data are no longer connected. Choose from:<ul><li>**Never** - Time series data points with gaps in the data are never connected.</li><li>**Always** - Time series data points with gaps in the data are always connected.</li><li>**Threshold** - Specify a threshold above which gaps in the data are no longer connected. This can be useful when the connected gaps in the data are of a known size or within a known range, and gaps outside this range should no longer be connected.</li></ul> |
|
||||
| Show points | Whether to show data points to lines or bars. Choose from: <ul><li>**Auto** - Grafana determines a point's visibility based on the density of the data. If the density is low, then points appear.</li><li>**Always** - Show the points regardless of how dense the dataset is.</li><li>**Never** - Don't show points.</li></ul> |
|
||||
| Point size | Set the size of the points, from 1 to 40 pixels in diameter. |
|
||||
| Bar alignment | Set the position of the bar relative to a data point. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Colored text
|
||||
|
||||
If thresholds, value mappings, or color schemes are set, the cell text is displayed in the appropriate color.
|
||||
@@ -346,6 +320,32 @@ Labels displayed alongside of the gauges can be set to be colored by value, matc
|
||||
| Hidden | Labels are hidden. {{< figure src="/media/docs/grafana/panels-visualizations/screenshot-labels-hidden-v11.3.png" alt="Table with labels hidden" >}} |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Sparkline
|
||||
|
||||
This cell type shows values rendered as a sparkline.
|
||||
To show sparklines on data with multiple time series, use the [Time series to table transformation](ref:time-series-to-table-transformation) to process it into a format the table can show.
|
||||
|
||||

|
||||
|
||||
The sparkline cell type options are described in the following table.
|
||||
For more detailed information about all of the sparkline styling options (except **Hide value**), refer to the [time series graph styles documentation](ref:graph-styles).
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| Hide value | Toggle the switch on or off to display or hide the cell value on the sparkline. |
|
||||
| Style | Choose whether to display your time-series data as **Lines**, **Bars**, or **Points**. You can use overrides to combine multiple styles in the same graph. |
|
||||
| Line interpolation | How the graph interpolates the series line. Choose from:<ul><li>**Linear** - Points are joined by straight lines.</li><li>**Smooth** - Points are joined by curved lines that smooths transitions between points.</li><li>**Step before** - The line is displayed as steps between points. Points are rendered at the end of the step.</li><li>**Step after** - The line is displayed as steps between points. Points are rendered at the beginning of the step.</li></ul> |
|
||||
| Line width | The thickness of the series lines or the outline for bars using the **Line width** slider. |
|
||||
| Fill opacity | The series area fill color using the **Fill opacity** slider. |
|
||||
| Gradient mode | Gradient mode controls the gradient fill, which is based on the series color. Gradient appearance is influenced by the **Fill opacity** setting. To change the color, use the standard color scheme field option. For more information, refer to [Color scheme](ref:color-scheme). Choose from:<ul><li>**None** - No gradient fill. This is the default setting.</li><li>**Opacity** - An opacity gradient where the opacity of the fill increases as y-axis values increase.</li><li>**Hue** - A subtle gradient that's based on the hue of the series color.</li></ul> |
|
||||
| Line style | Choose from:<ul><li>**Solid**</li><li>**Dash** - Select the length and gap for the line dashes. Default dash spacing is 10, 10.</li><li>**Dots** - Select the gap for the dot spacing. Default dot spacing is 0, 10.</li></ul> |
|
||||
| Connect null values | How null values, which are gaps in the data, appear on the graph. Null values can be connected to form a continuous line or set to a threshold above which gaps in the data are no longer connected. Choose from:<ul><li>**Never** - Time series data points with gaps in the data are never connected.</li><li>**Always** - Time series data points with gaps in the data are always connected.</li><li>**Threshold** - Specify a threshold above which gaps in the data are no longer connected. This can be useful when the connected gaps in the data are of a known size or within a known range, and gaps outside this range should no longer be connected.</li></ul> |
|
||||
| Show points | Whether to show data points to lines or bars. Choose from: <ul><li>**Auto** - Grafana determines a point's visibility based on the density of the data. If the density is low, then points appear.</li><li>**Always** - Show the points regardless of how dense the dataset is.</li><li>**Never** - Don't show points.</li></ul> |
|
||||
| Point size | Set the size of the points, from 1 to 40 pixels in diameter. |
|
||||
| Bar alignment | Set the position of the bar relative to a data point. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### JSON View
|
||||
|
||||
This cell type shows values formatted as code.
|
||||
|
||||
@@ -15,10 +15,7 @@ weight: 300
|
||||
Custom branding enables you to replace the Grafana Labs brand and logo with your corporate brand and logo.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud). For Cloud Advanced and Enterprise customers, please provide custom elements and logos to our Support team. We will help you host your images and update your custom branding.
|
||||
|
||||
This feature is not available for Grafana Free and Pro tiers.
|
||||
For more information on feature availability across plans, refer to our [feature comparison page](/docs/grafana-cloud/cost-management-and-billing/understand-grafana-cloud-features/)
|
||||
Available in [Grafana Enterprise](../../../introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team. For Cloud customers, please provide custom elements and logos to our Support team. We will help you host your images and update your custom branding.
|
||||
|
||||
{{< /admonition >}}
|
||||
|
||||
|
||||
+2
-1
@@ -237,7 +237,8 @@ If the user is deleted from Grafana, the user will be not be able to login and r
|
||||
### Team Sync
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
|
||||
{{< /admonition >}}
|
||||
|
||||
With Team Sync, it's possible to set up synchronization between teams in your authentication provider and Grafana. You can send Grafana values as part of an HTTP header and have Grafana map them to your team structure. This allows you to put users into specific teams automatically.
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ auto_login = true
|
||||
### Team Sync
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
With Team Sync you can map your Entra ID groups to teams in Grafana so that your users will automatically be added to
|
||||
|
||||
+1
-1
@@ -320,7 +320,7 @@ org_mapping = org_foo:org_foo:Viewer org_bar:org_bar:Editor *:org_baz:Editor
|
||||
## Configure team synchronization
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
By using Team Sync, you can link your OAuth2 groups to teams within Grafana. This will automatically assign users to the appropriate teams.
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ role_attribute_path = [login=='octocat'][0] && 'GrafanaAdmin' || 'Viewer'
|
||||
## Configure team synchronization
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
By using Team Sync, you can map teams from your GitHub organization to teams within Grafana. This will automatically assign users to the appropriate teams.
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ use_refresh_token = true
|
||||
## Configure team synchronization
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
By using Team Sync, you can map GitLab groups to teams within Grafana. This will automatically assign users to the appropriate teams.
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@ auto_login = true
|
||||
### Configure team synchronization
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
With team sync, you can easily add users to teams by utilizing their Google groups. To set up team sync for Google OAuth, refer to the following example.
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ viewer
|
||||
## Team sync
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
[Teamsync](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-team-sync/) is a feature that allows you to map groups from your identity provider to Grafana teams. This is useful if you want to give your users access to specific dashboards or folders based on their group membership.
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ org_mapping = ["Group 1:org_foo:Viewer", "Group 2:org_bar:Editor", "*:3:Editor"]
|
||||
### Configure team synchronization
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
By using Team Sync, you can link your Okta groups to teams within Grafana. This will automatically assign users to the appropriate teams.
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ weight: 540
|
||||
# Configure team sync for SAML
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
To use SAML Team sync, set [`assertion_attribute_groups`](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/enterprise-configuration/#assertion_attribute_groups) to the attribute name where you store user groups. Then Grafana will use attribute values extracted from SAML assertion to add user into the groups with the same name configured on the External group sync tab.
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ weight: 510
|
||||
# Configure SAML authentication using the Grafana user interface
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) version 10.0 and later, and [Grafana Cloud Pro or Advanced](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) version 10.0 and later, and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
You can configure SAML authentication in Grafana through the user interface (UI) or the Grafana configuration file. For instructions on how to set up SAML using the Grafana configuration file, refer to [Configure SAML authentication using the configuration file](../#configure-saml-using-the-grafana-config-file).
|
||||
@@ -40,7 +40,7 @@ To follow this guide, you need:
|
||||
These permissions are granted by `fixed:authentication.config:writer` role.
|
||||
By default, this role is granted to Grafana server administrator in self-hosted instances and to Organization admins in Grafana Cloud instances.
|
||||
|
||||
- Grafana instance running Grafana version 10.0 or later with [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) or [Grafana Cloud Pro or Advanced](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-cloud/) license.
|
||||
- Grafana instance running Grafana version 10.0 or later with [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
|
||||
## Steps To Configure SAML Authentication
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Request security allows you to limit requests from the Grafana server by targeti
|
||||
This can be used to limit access to internal systems that the server Grafana runs on can access but that users of Grafana should not be able to access. This feature does not affect traffic from the Grafana users browser.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](../../../introduction/grafana-enterprise/) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](../../../introduction/grafana-enterprise/) and to users on select Grafana Cloud account plans. For pricing information, visit our [pricing page](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
|
||||
@@ -20,7 +20,7 @@ weight: 300
|
||||
System for Cross-domain Identity Management (SCIM) is an open standard that allows automated user provisioning and management. With SCIM, you can automate the provisioning of users and groups from your identity provider to Grafana.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/) in [public preview](https://grafana.com/docs/release-life-cycle/).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and select Grafana Cloud plans in [public preview](https://grafana.com/docs/release-life-cycle/).
|
||||
Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{< /admonition >}}
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ weight: 320
|
||||
# Configure SCIM with Azure AD
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and to customers on select Grafana Cloud plans. For pricing information, visit [pricing](https://grafana.com/pricing/) or contact our sales team.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
@@ -49,7 +49,7 @@ Refer to the [SAML authentication with Azure AD documentation](../../configure-a
|
||||
|
||||
Before configuring SCIM with Azure AD, ensure you have:
|
||||
|
||||
- Grafana Enterprise or Grafana Cloud Advanced
|
||||
- Grafana Enterprise or a paid Grafana Cloud account with SCIM provisioning enabled.
|
||||
- Admin access to both Grafana and Azure AD
|
||||
- SCIM feature enabled in Grafana
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user