Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfcea75916 |
@@ -2523,7 +2523,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
||||
],
|
||||
"public/app/features/dashboard/state/DashboardModel.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
aks
|
||||
eror
|
||||
iam
|
||||
wan
|
||||
44
.drone.star
44
.drone.star
@@ -7,49 +7,53 @@
|
||||
This module returns a Drone configuration including pipelines and secrets.
|
||||
"""
|
||||
|
||||
load("scripts/drone/events/cron.star", "cronjobs")
|
||||
load("scripts/drone/events/main.star", "main_pipelines")
|
||||
load("scripts/drone/events/pr.star", "pr_pipelines")
|
||||
load("scripts/drone/events/main.star", "main_pipelines")
|
||||
load(
|
||||
"scripts/drone/events/release.star",
|
||||
"artifacts_page_pipeline",
|
||||
"enterprise2_pipelines",
|
||||
"enterprise_pipelines",
|
||||
"integration_test_pipelines",
|
||||
"oss_pipelines",
|
||||
"publish_artifacts_pipelines",
|
||||
"publish_npm_pipelines",
|
||||
"publish_packages_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/ci_images.star",
|
||||
"publish_ci_windows_test_image_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/publish_images.star",
|
||||
"publish_image_pipelines_public",
|
||||
"publish_image_pipelines_security",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/windows.star",
|
||||
"windows_test_backend",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/rgm.star",
|
||||
"rgm",
|
||||
)
|
||||
load("scripts/drone/pipelines/github.star", "publish_github_pipeline")
|
||||
load("scripts/drone/pipelines/aws_marketplace.star", "publish_aws_marketplace_pipeline")
|
||||
load("scripts/drone/version.star", "version_branch_pipelines")
|
||||
load("scripts/drone/events/cron.star", "cronjobs")
|
||||
load("scripts/drone/vault.star", "secrets")
|
||||
|
||||
def main(_ctx):
|
||||
return (
|
||||
pr_pipelines() +
|
||||
main_pipelines() +
|
||||
oss_pipelines() +
|
||||
enterprise_pipelines() +
|
||||
enterprise2_pipelines() +
|
||||
enterprise2_pipelines(
|
||||
prefix = "custom-",
|
||||
trigger = {"event": ["custom"]},
|
||||
) +
|
||||
publish_image_pipelines_public() +
|
||||
publish_image_pipelines_security() +
|
||||
publish_github_pipeline("public") +
|
||||
publish_github_pipeline("security") +
|
||||
publish_aws_marketplace_pipeline("public") +
|
||||
publish_artifacts_pipelines("security") +
|
||||
publish_artifacts_pipelines("public") +
|
||||
publish_npm_pipelines() +
|
||||
publish_packages_pipeline() +
|
||||
rgm() +
|
||||
[windows_test_backend({
|
||||
"event": ["promote"],
|
||||
"target": ["test-windows"],
|
||||
}, "oss", "testing")] +
|
||||
artifacts_page_pipeline() +
|
||||
version_branch_pipelines() +
|
||||
integration_test_pipelines() +
|
||||
publish_ci_windows_test_image_pipeline() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
|
||||
6847
.drone.yml
6847
.drone.yml
File diff suppressed because it is too large
Load Diff
49
.github/CODEOWNERS
vendored
49
.github/CODEOWNERS
vendored
@@ -220,15 +220,14 @@
|
||||
|
||||
|
||||
# Continuous Integration
|
||||
.drone.yml @grafana/grafana-release-guild
|
||||
.drone.star @grafana/grafana-release-guild
|
||||
/scripts/drone/ @grafana/grafana-release-guild
|
||||
/pkg/build/ @grafana/grafana-release-guild
|
||||
/.dockerignore @grafana/grafana-release-guild
|
||||
/Dockerfile @grafana/grafana-release-guild
|
||||
/Makefile @grafana/grafana-release-guild
|
||||
/scripts/build/ @grafana/grafana-release-guild
|
||||
/scripts/list-release-artifacts.sh @grafana/grafana-release-guild
|
||||
.drone.yml @grafana/grafana-delivery
|
||||
.drone.star @grafana/grafana-delivery
|
||||
/scripts/drone/ @grafana/grafana-delivery
|
||||
/pkg/build/ @grafana/grafana-delivery
|
||||
/.dockerignore @grafana/grafana-delivery
|
||||
/Dockerfile @grafana/grafana-delivery
|
||||
/Makefile @grafana/grafana-delivery
|
||||
/scripts/build/ @grafana/grafana-delivery
|
||||
|
||||
# OSS Plugin Partnerships backend code
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-datasources
|
||||
@@ -429,7 +428,6 @@ lerna.json @grafana/frontend-ops
|
||||
/public/gazetteer/ @ryantxu
|
||||
/public/img/ @grafana/grafana-frontend-platform
|
||||
/public/lib/ @grafana/grafana-frontend-platform
|
||||
/public/lib/monaco-languages/kusto.ts @grafana/partner-datasources
|
||||
/public/maps/ @ryantxu
|
||||
/public/robots.txt @grafana/frontend-ops
|
||||
/public/sass/ @grafana/grafana-frontend-platform
|
||||
@@ -456,25 +454,25 @@ lerna.json @grafana/frontend-ops
|
||||
|
||||
/scripts/benchmark-access-control.sh @grafana/grafana-authnz-team
|
||||
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
|
||||
/scripts/ci-* @grafana/grafana-release-guild
|
||||
/scripts/circle-* @grafana/grafana-release-guild
|
||||
/scripts/ci-* @grafana/grafana-delivery
|
||||
/scripts/circle-* @grafana/grafana-delivery
|
||||
/scripts/ci-frontend-metrics.sh @grafana/grafana-frontend-platform @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
|
||||
/scripts/cli/ @grafana/grafana-frontend-platform
|
||||
/scripts/clean-git-or-error.sh @grafana/grafana-as-code
|
||||
/scripts/grafana-server/ @grafana/grafana-frontend-platform
|
||||
/scripts/helpers/ @grafana/grafana-release-guild
|
||||
/scripts/helpers/ @grafana/grafana-delivery
|
||||
/scripts/import_many_dashboards.sh @torkelo
|
||||
/scripts/mixin-check.sh @bergquist
|
||||
/scripts/openapi3/ @grafana/grafana-operator-experience-squad
|
||||
/scripts/prepare-packagejson.js @grafana/frontend-ops
|
||||
/scripts/protobuf-check.sh @grafana/plugins-platform-backend
|
||||
/scripts/stripnulls.sh @grafana/grafana-as-code
|
||||
/scripts/tag_release.sh @grafana/grafana-release-guild
|
||||
/scripts/trigger_docker_build.sh @grafana/grafana-release-guild
|
||||
/scripts/trigger_grafana_packer.sh @grafana/grafana-release-guild
|
||||
/scripts/trigger_windows_build.sh @grafana/grafana-release-guild
|
||||
/scripts/validate-devenv-dashboards.sh @grafana/grafana-release-guild
|
||||
/scripts/verify-repo-update/ @grafana/grafana-release-guild
|
||||
/scripts/tag_release.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_docker_build.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_grafana_packer.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_windows_build.sh @grafana/grafana-delivery
|
||||
/scripts/validate-devenv-dashboards.sh @grafana/grafana-delivery
|
||||
/scripts/verify-repo-update/ @grafana/grafana-delivery
|
||||
|
||||
/scripts/webpack/ @grafana/frontend-ops
|
||||
/scripts/generate-a11y-report.sh @grafana/grafana-frontend-platform
|
||||
@@ -571,10 +569,9 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/pr-commands.json @marefr
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/backport.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/backport.yml @grafana/grafana-delivery
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-delivery
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-delivery
|
||||
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-datasources
|
||||
/.github/workflows/codeowners-validator.yml @tolzhabayev
|
||||
/.github/workflows/codeql-analysis.yml @DanCech
|
||||
@@ -594,8 +591,6 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/pr-codeql-analysis-python.yml @DanCech
|
||||
/.github/workflows/pr-commands-closed.yml @tolzhabayev
|
||||
/.github/workflows/pr-commands.yml @marefr
|
||||
/.github/workflows/pr-patch-check.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/sync-mirror.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/publish-technical-documentation-next.yml @grafana/docs-grafana
|
||||
/.github/workflows/publish-technical-documentation-release.yml @grafana/docs-grafana
|
||||
/.github/workflows/remove-milestone.yml @grafana/grafana-frontend-platform
|
||||
@@ -603,9 +598,9 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
|
||||
/.github/workflows/scripts/pr-get-job-link.js @grafana/plugins-platform-frontend
|
||||
/.github/workflows/stale.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-delivery
|
||||
/.github/workflows/snyk.yml @grafana/security-team
|
||||
/.github/workflows/create-security-patch-from-security-mirror.yml @grafana/grafana-release-guild
|
||||
|
||||
|
||||
# Conf
|
||||
/conf/defaults.ini @torkelo
|
||||
|
||||
2
.github/pr-checks.json
vendored
2
.github/pr-checks.json
vendored
@@ -46,4 +46,4 @@
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
|
||||
}
|
||||
]
|
||||
]
|
||||
24
.github/workflows/auto-milestone.yml
vendored
24
.github/workflows/auto-milestone.yml
vendored
@@ -1,24 +0,0 @@
|
||||
name: Auto-milestone
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
with:
|
||||
pr: ${{ github.event.pull_request.number }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
8
.github/workflows/backport.yml
vendored
8
.github/workflows/backport.yml
vendored
@@ -17,16 +17,10 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run backport
|
||||
uses: ./actions/backport
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
labelsToAdd: "backport,no-changelog"
|
||||
title: "[{{base}}] {{originalTitle}}"
|
||||
|
||||
14
.github/workflows/bump-version.yml
vendored
14
.github/workflows/bump-version.yml
vendored
@@ -6,12 +6,12 @@ on:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
id: regex-match
|
||||
@@ -68,14 +68,8 @@ jobs:
|
||||
node-version: '16'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run bump version (manually invoked)
|
||||
- name: Run bump version (manually invoked)
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
|
||||
14
.github/workflows/close-milestone.yml
vendored
14
.github/workflows/close-milestone.yml
vendored
@@ -11,7 +11,9 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -24,20 +26,14 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Close milestone (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
- name: Close milestone (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.token }}
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
name: Set go version
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.21.8'
|
||||
go-version: '1.19.2'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Owned by grafana-release-guild
|
||||
# Intended to be dropped into the base repo (Ex: grafana/grafana) for use in the security mirror.
|
||||
name: Create security patch
|
||||
run-name: create-security-patch
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
|
||||
# This is run before the pull request has been merged, so we'll run against the src branch
|
||||
jobs:
|
||||
trigger_downstream_create_security_patch:
|
||||
concurrency: create-patch-${{ github.ref_name }}
|
||||
uses: grafana/security-patch-actions/.github/workflows/create-patch.yml@main
|
||||
if: github.repository == 'grafana/grafana-security-mirror'
|
||||
with:
|
||||
repo: "${{ github.repository }}"
|
||||
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
|
||||
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
|
||||
patch_repo: "grafana/grafana-security-patches"
|
||||
patch_prefix: "${{ github.event.pull_request.number }}"
|
||||
secrets: inherit
|
||||
|
||||
12
.github/workflows/github-release.yml
vendored
12
.github/workflows/github-release.yml
vendored
@@ -3,7 +3,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
jobs:
|
||||
main:
|
||||
@@ -14,17 +14,11 @@ jobs:
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run github release action
|
||||
uses: ./actions/github-release
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
|
||||
8
.github/workflows/milestone.yml
vendored
8
.github/workflows/milestone.yml
vendored
@@ -10,10 +10,12 @@ jobs:
|
||||
uses: grafana/grafana/.github/workflows/remove-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets: inherit
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
call-close-milestone:
|
||||
uses: grafana/grafana/.github/workflows/close-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets: inherit
|
||||
needs: call-remove-milestone
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
needs: call-remove-milestone
|
||||
2
.github/workflows/pr-codeql-analysis-go.yml
vendored
2
.github/workflows/pr-codeql-analysis-go.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.21.8'
|
||||
go-version: '1.19.2'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
28
.github/workflows/pr-commands.yml
vendored
28
.github/workflows/pr-commands.yml
vendored
@@ -8,44 +8,20 @@ on:
|
||||
concurrency:
|
||||
group: pr-commands-${{ github.event.number }}
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ (secrets.GRAFANA_PR_AUTOMATION_APP_ID != '' &&
|
||||
secrets.GRAFANA_PR_AUTOMATION_APP_PEM != '' &&
|
||||
secrets.GRAFANA_MISC_STATS_API_KEY != ''
|
||||
) || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
main:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_PEM }}
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
configPath: pr-commands
|
||||
|
||||
27
.github/workflows/pr-patch-check.yml
vendored
27
.github/workflows/pr-patch-check.yml
vendored
@@ -1,27 +0,0 @@
|
||||
# Owned by grafana-release-guild
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Check for patch conflicts
|
||||
run-name: check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# Since this is run on a pull request, we want to apply the patches intended for the
|
||||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
trigger_downstream_patch_check:
|
||||
uses: grafana/security-patch-actions/.github/workflows/test-patches.yml@main
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
src_repo: "${{ github.repository }}"
|
||||
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
|
||||
secrets: inherit
|
||||
14
.github/workflows/remove-milestone.yml
vendored
14
.github/workflows/remove-milestone.yml
vendored
@@ -11,7 +11,9 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -24,20 +26,14 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Remove milestone from open issues (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
- name: Remove milestone from open issues (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.token }}
|
||||
|
||||
25
.github/workflows/sync-mirror.yml
vendored
25
.github/workflows/sync-mirror.yml
vendored
@@ -1,25 +0,0 @@
|
||||
# Owned by grafana-release-guild
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Sync to mirror
|
||||
run-name: sync-to-mirror-${{ github.ref_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# This is run after the pull request has been merged, so we'll run against the target branch
|
||||
jobs:
|
||||
trigger_downstream_patch_mirror:
|
||||
concurrency: patch-mirror-${{ github.ref_name }}
|
||||
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main"
|
||||
src_repo: "${{ github.repository }}"
|
||||
dest_repo: "${{ github.repository }}-security-mirror"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
secrets: inherit
|
||||
|
||||
12
.github/workflows/update-changelog.yml
vendored
12
.github/workflows/update-changelog.yml
vendored
@@ -17,15 +17,9 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
- name: Run update changelog (manually invoked)
|
||||
uses: ./actions/update-changelog
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run update changelog (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/update-changelog@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
grafanabotForumKey: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -191,6 +191,3 @@ public/api-spec.json
|
||||
deployment_tools_config.json
|
||||
|
||||
.betterer.cache
|
||||
|
||||
# Temporary file for backporting PRs
|
||||
.pr-body.txt
|
||||
|
||||
@@ -80,7 +80,7 @@ var config = {
|
||||
{
|
||||
url: '${HOST}/?orgId=1',
|
||||
wait: 500,
|
||||
threshold: 3,
|
||||
threshold: 0,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
||||
@@ -93,7 +93,7 @@ var config = {
|
||||
url: '${HOST}/?orgId=1&search=open',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 3,
|
||||
threshold: 0,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/alerting/list',
|
||||
|
||||
4485
CHANGELOG.md
4485
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
10
Dockerfile
10
Dockerfile
@@ -1,9 +1,9 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
ARG JS_IMAGE=node:18-alpine
|
||||
ARG BASE_IMAGE=alpine:3.17
|
||||
ARG JS_IMAGE=node:18-alpine3.17
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.21.8-alpine
|
||||
ARG GO_IMAGE=golang:1.20.4-alpine3.17
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
@@ -64,7 +64,6 @@ COPY pkg pkg
|
||||
COPY scripts scripts
|
||||
COPY conf conf
|
||||
COPY .github .github
|
||||
COPY LICENSE ./
|
||||
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
@@ -111,7 +110,7 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
elif grep -i -q ubuntu /etc/issue; then \
|
||||
DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y ca-certificates curl tzdata musl && \
|
||||
apt-get install -y ca-certificates curl tzdata && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
else \
|
||||
@@ -166,7 +165,6 @@ RUN if [ ! $(getent group "$GF_GID") ]; then \
|
||||
|
||||
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
|
||||
COPY --from=js-src /tmp/grafana/public ./public
|
||||
COPY --from=go-src /tmp/grafana/LICENSE ./
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
96
Makefile
96
Makefile
@@ -13,12 +13,11 @@ GO = go
|
||||
GO_FILES ?= ./pkg/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
|
||||
|
||||
targets := $(shell echo '$(sources)' | tr "," " ")
|
||||
|
||||
GO_INTEGRATION_TESTS := $(shell find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
|
||||
|
||||
all: deps build
|
||||
|
||||
##@ Dependencies
|
||||
@@ -36,68 +35,36 @@ node_modules: package.json yarn.lock ## Install node modules.
|
||||
|
||||
##@ Swagger
|
||||
SPEC_TARGET = public/api-spec.json
|
||||
ENTERPRISE_SPEC_TARGET = public/api-enterprise-spec.json
|
||||
MERGED_SPEC_TARGET = public/api-merged.json
|
||||
MERGED_SPEC_TARGET := public/api-merged.json
|
||||
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/api.json
|
||||
|
||||
$(NGALERT_SPEC_TARGET):
|
||||
+$(MAKE) -C pkg/services/ngalert/api/tooling api.json
|
||||
|
||||
$(MERGED_SPEC_TARGET): swagger-oss-gen swagger-enterprise-gen $(NGALERT_SPEC_TARGET) $(SWAGGER) ## Merge generated and ngalert API specs
|
||||
$(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) $(SWAGGER) ## Merge generated and ngalert API specs
|
||||
# known conflicts DsPermissionType, AddApiKeyCommand, Json, Duration (identical models referenced by both specs)
|
||||
$(SWAGGER) mixin $(SPEC_TARGET) $(ENTERPRISE_SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
|
||||
$(SWAGGER) mixin $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
|
||||
|
||||
swagger-oss-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
@echo "re-generating swagger for OSS"
|
||||
rm -f $(SPEC_TARGET)
|
||||
$(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
|
||||
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha \
|
||||
--exclude-tag=enterprise
|
||||
--exclude-tag=alpha
|
||||
go run pkg/services/ngalert/api/tooling/cmd/clean-swagger/main.go -if $@ -of $@
|
||||
|
||||
# this file only exists if enterprise is enabled
|
||||
ENTERPRISE_EXT_FILE = pkg/extensions/ext.go
|
||||
ifeq ("$(wildcard $(ENTERPRISE_EXT_FILE))","") ## if enterprise is not enabled
|
||||
swagger-enterprise-gen:
|
||||
@echo "skipping re-generating swagger for enterprise: not enabled"
|
||||
else
|
||||
swagger-enterprise-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
@echo "re-generating swagger for enterprise"
|
||||
rm -f $(ENTERPRISE_SPEC_TARGET)
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(ENTERPRISE_SPEC_TARGET) \
|
||||
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha \
|
||||
--include-tag=enterprise
|
||||
endif
|
||||
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
|
||||
|
||||
swagger-gen: gen-go $(MERGED_SPEC_TARGET) swagger-validate
|
||||
|
||||
swagger-validate: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
|
||||
validate-api-spec: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
|
||||
$(SWAGGER) validate $(<)
|
||||
|
||||
swagger-clean:
|
||||
clean-api-spec:
|
||||
rm -f $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
.PHONY: cleanup-old-git-hooks
|
||||
cleanup-old-git-hooks:
|
||||
./scripts/cleanup-husky.sh
|
||||
|
||||
.PHONY: lefthook-install
|
||||
lefthook-install: cleanup-old-git-hooks $(LEFTHOOK) # install lefthook for pre-commit hooks
|
||||
$(LEFTHOOK) install -f
|
||||
|
||||
.PHONY: lefthook-uninstall
|
||||
lefthook-uninstall: $(LEFTHOOK)
|
||||
$(LEFTHOOK) uninstall
|
||||
|
||||
##@ OpenAPI 3
|
||||
OAPI_SPEC_TARGET = public/openapi3.json
|
||||
|
||||
openapi3-gen: swagger-gen ## Generates OpenApi 3 specs from the Swagger 2 already generated
|
||||
openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 already generated
|
||||
$(GO) run scripts/openapi3/openapi3conv.go $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
##@ Building
|
||||
@@ -108,7 +75,7 @@ gen-cue: ## Do all CUE/Thema code generation
|
||||
go generate ./public/app/plugins/gen.go
|
||||
go generate ./pkg/kindsys/report.go
|
||||
|
||||
gen-go: $(WIRE)
|
||||
gen-go: $(WIRE) gen-cue
|
||||
@echo "generate go files"
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
|
||||
|
||||
@@ -162,39 +129,19 @@ test-go-unit: ## Run unit tests for backend with flags.
|
||||
.PHONY: test-go-integration
|
||||
test-go-integration: ## Run integration tests for backend with flags.
|
||||
@echo "test backend integration tests"
|
||||
$(GO) test -count=1 -run "^TestIntegration" -covermode=atomic -timeout=5m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-alertmanager
|
||||
test-go-integration-alertmanager: ## Run integration tests for the remote alertmanager (config taken from the mimir_backend block).
|
||||
@echo "test remote alertmanager integration tests"
|
||||
$(GO) clean -testcache
|
||||
AM_URL=http://localhost:8080 AM_TENANT_ID=test AM_PASSWORD=test \
|
||||
$(GO) test -count=1 -run "^TestIntegrationRemoteAlertmanager" -covermode=atomic -timeout=5m ./pkg/services/ngalert/notifier/...
|
||||
$(GO) test -run Integration -covermode=atomic -timeout=30m ./pkg/...
|
||||
|
||||
.PHONY: test-go-integration-postgres
|
||||
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
|
||||
@echo "test backend integration postgres tests"
|
||||
$(GO) clean -testcache
|
||||
GRAFANA_TEST_DB=postgres \
|
||||
$(GO) test -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=2m {}'
|
||||
|
||||
.PHONY: test-go-integration-mysql
|
||||
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
|
||||
@echo "test backend integration mysql tests"
|
||||
GRAFANA_TEST_DB=mysql \
|
||||
$(GO) test -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-redis
|
||||
test-go-integration-redis: ## Run integration tests for redis cache.
|
||||
@echo "test backend integration redis tests"
|
||||
$(GO) clean -testcache
|
||||
REDIS_URL=localhost:6379 $(GO) test -run IntegrationRedis -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-memcached
|
||||
test-go-integration-memcached: ## Run integration tests for memcached cache.
|
||||
@echo "test backend integration memcached tests"
|
||||
$(GO) clean -testcache
|
||||
MEMCACHED_HOSTS=localhost:11211 $(GO) test -run IntegrationMemcached -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=2m {}'
|
||||
|
||||
test-js: ## Run tests for frontend.
|
||||
@echo "test frontend"
|
||||
@@ -229,7 +176,7 @@ build-docker-full: ## Build Docker image for development.
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse HEAD) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
@@ -242,10 +189,10 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse HEAD) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--build-arg BASE_IMAGE=ubuntu:22.04 \
|
||||
--build-arg GO_IMAGE=golang:1.21.8 \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.4 \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
@@ -290,9 +237,6 @@ devenv-mysql:
|
||||
protobuf: ## Compile protobuf definitions
|
||||
bash scripts/protobuf-check.sh
|
||||
bash pkg/plugins/backendplugin/pluginextensionv2/generate.sh
|
||||
bash pkg/plugins/backendplugin/secretsmanagerplugin/generate.sh
|
||||
bash pkg/services/store/entity/generate.sh
|
||||
bash pkg/infra/grn/generate.sh
|
||||
|
||||
clean: ## Clean up intermediate build artifacts.
|
||||
@echo "cleaning"
|
||||
@@ -318,7 +262,7 @@ scripts/drone/TAGS: $(shell find scripts/drone -name '*.star')
|
||||
etags --lang none --regex="/def \(\w+\)[^:]+:/\1/" --regex="/\s*\(\w+\) =/\1/" $^ -o $@
|
||||
|
||||
format-drone:
|
||||
buildifier --lint=fix -r scripts/drone
|
||||
buildifier -r scripts/drone
|
||||
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
@@ -239,7 +239,7 @@ reporting_distributor = grafana-labs
|
||||
# for new versions of grafana. The check is used
|
||||
# in some UI views to notify that a grafana update exists.
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://grafana.com/api/grafana/versions/stable to get the latest version.
|
||||
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
|
||||
check_for_updates = true
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
@@ -531,20 +531,6 @@ sigv4_verbose_logging = false
|
||||
# Set to true to enable Azure authentication option for HTTP-based datasources
|
||||
azure_auth_enabled = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
oauth_allow_insecure_email_lookup = false
|
||||
|
||||
# Set to true to include id of identity as a response header
|
||||
id_response_header_enabled = false
|
||||
|
||||
# Prefix used for the id response header, X-Grafana-Identity-Id
|
||||
id_response_header_prefix = X-Grafana
|
||||
|
||||
# List of identity namespaces to add id response headers for, separated by space.
|
||||
# Available namespaces are user, api-key and service-account.
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
id_response_header_namespaces = user api-key service-account
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -578,7 +564,6 @@ allowed_organizations =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
@@ -794,24 +779,6 @@ managed_identity_enabled = false
|
||||
# Should be set for user-assigned identity and should be empty for system-assigned identity
|
||||
managed_identity_client_id =
|
||||
|
||||
# Specifies whether Azure AD Workload Identity authentication should be enabled in datasources that support it
|
||||
# For more documentation on Azure AD Workload Identity, review this documentation:
|
||||
# https://azure.github.io/azure-workload-identity/docs/
|
||||
# Disabled by default, needs to be explicitly enabled
|
||||
workload_identity_enabled = false
|
||||
|
||||
# Tenant ID of the Azure AD Workload Identity
|
||||
# Allows to override default tenant ID of the Azure AD identity associated with the Kubernetes service account
|
||||
workload_identity_tenant_id =
|
||||
|
||||
# Client ID of the Azure AD Workload Identity
|
||||
# Allows to override default client ID of the Azure AD identity associated with the Kubernetes service account
|
||||
workload_identity_client_id =
|
||||
|
||||
# Custom path to token file for the Azure AD Workload Identity
|
||||
# Allows to set a custom path to the projected service account token file
|
||||
workload_identity_token_file =
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
# If enabled, cache permissions in a in memory cache
|
||||
@@ -1027,18 +994,13 @@ execute_alerts = true
|
||||
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
evaluation_timeout = 30s
|
||||
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is 1.
|
||||
max_attempts = 1
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
max_attempts = 3
|
||||
|
||||
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_interval = 10s
|
||||
|
||||
# This is an experimental option to add parallelization to saving alert states in the database.
|
||||
# It configures the maximum number of concurrent queries per rule evaluated. The default value is 1
|
||||
# (concurrent queries per rule disabled).
|
||||
max_state_save_concurrency = 1
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
|
||||
# plugin, or set up Grafana to use a remote rendering service.
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
# for new versions of grafana. The check is used
|
||||
# in some UI views to notify that a grafana update exists.
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://grafana.com/api/grafana/versions/stable to get the latest version.
|
||||
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
|
||||
;check_for_updates = true
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
@@ -520,20 +520,6 @@
|
||||
# Set to skip the organization role from JWT login and use system's role assignment instead.
|
||||
; skip_org_role_sync = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
;oauth_allow_insecure_email_lookup = false
|
||||
|
||||
# Set to true to include id of identity as a response header
|
||||
;id_response_header_enabled = false
|
||||
|
||||
# Prefix used for the id response header, X-Grafana-Identity-Id
|
||||
;id_response_header_prefix = X-Grafana
|
||||
|
||||
# List of identity namespaces to add id response headers for, separated by space.
|
||||
# Available namespaces are user, api-key and service-account.
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
;id_response_header_namespaces = user api-key service-account
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -567,7 +553,6 @@
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
@@ -765,24 +750,6 @@
|
||||
# Should be set for user-assigned identity and should be empty for system-assigned identity
|
||||
;managed_identity_client_id =
|
||||
|
||||
# Specifies whether Azure AD Workload Identity authentication should be enabled in datasources that support it
|
||||
# For more documentation on Azure AD Workload Identity, review this documentation:
|
||||
# https://azure.github.io/azure-workload-identity/docs/
|
||||
# Disabled by default, needs to be explicitly enabled
|
||||
;workload_identity_enabled = false
|
||||
|
||||
# Tenant ID of the Azure AD Workload Identity
|
||||
# Allows to override default tenant ID of the Azure AD identity associated with the Kubernetes service account
|
||||
;workload_identity_tenant_id =
|
||||
|
||||
# Client ID of the Azure AD Workload Identity
|
||||
# Allows to override default client ID of the Azure AD identity associated with the Kubernetes service account
|
||||
;workload_identity_client_id =
|
||||
|
||||
# Custom path to token file for the Azure AD Workload Identity
|
||||
# Allows to set a custom path to the projected service account token file
|
||||
;workload_identity_token_file =
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
;permission_cache = true
|
||||
@@ -996,8 +963,8 @@
|
||||
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;evaluation_timeout = 30s
|
||||
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is 1.
|
||||
;max_attempts = 1
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
;max_attempts = 3
|
||||
|
||||
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Upgrading Go Version
|
||||
|
||||
Notes on upgrading Go version.
|
||||
|
||||
Example PR: https://github.com/grafana/grafana/pull/79329
|
||||
|
||||
## The main areas that need to change during the upgrade are:
|
||||
|
||||
- https://github.com/grafana/grafana/blob/d8ecea4ed93efb2e4d64a5ee24bc08f3805f413d/scripts/drone/variables.star#L6
|
||||
- https://github.com/grafana/grafana/blob/d8ecea4ed93efb2e4d64a5ee24bc08f3805f413d/Makefile#L264
|
||||
- https://github.com/grafana/grafana/blob/d8ecea4ed93efb2e4d64a5ee24bc08f3805f413d/Dockerfile#L6
|
||||
|
||||
Make sure to run `make drone` so that changes to `.star` files are reflected and `drone.yml` is generated.
|
||||
|
||||
### Additional files to change
|
||||
|
||||
- Take a look in `.github/workflows` folder for what `go` version is being used there in various workflows.
|
||||
- Make sure to create a PR with the corresponding changes in `grafana/grafana-enterprise` repository.
|
||||
|
||||
## Updating the go.mod file
|
||||
|
||||
Please avoid updating the `go.mod` to the newest version unless really necessary. This ensures backwards compatibility and introduces less breaking changes. Always upgrade Go version in the runtime files above first, let them run for a couple of weeks and only then consider updating the `go.mod` file if necessary.
|
||||
@@ -13,6 +13,7 @@ The following checklist/summary should give you a quick overview of what to ask/
|
||||
- Reviewed and approved?
|
||||
- All checks passed?
|
||||
- Proper pull request title?
|
||||
- Milestone assigned?
|
||||
- Add to changelog/release notes?
|
||||
- Needs backporting?
|
||||
|
||||
@@ -39,18 +40,10 @@ See [formatting guidelines](create-pull-request.md#formatting-guidelines) for mo
|
||||
|
||||
### Assign a milestone
|
||||
|
||||
Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
A milestone **should** be added to every pull request. Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
This makes it easier to track what changes go into a certain release. Without this information, release managers have to go through git commits which is not an efficient process.
|
||||
|
||||
That being said, _you don't have to assign a milestone manually_ to a pull request.
|
||||
Instead, when it is merged & closed then a bot will look for the most appropriate miletone and assign it to the pull request.
|
||||
|
||||
That milestone should always reflect the branch that the pull request is merged into.
|
||||
For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases).
|
||||
Pull requests targeting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
|
||||
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
|
||||
|
||||
### Include in changelog and release notes?
|
||||
|
||||
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
|
||||
@@ -85,15 +78,15 @@ The changelog/release notes are divided into sections and here's a description o
|
||||
|
||||
**Features and enhancements:**
|
||||
|
||||
Labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
|
||||
**Bug fixes:**
|
||||
|
||||
Labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
|
||||
**Plugin development fixes & changes:**
|
||||
|
||||
Labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
|
||||
**Deprecations:**
|
||||
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
.ONESHELL:
|
||||
.DELETE_ON_ERROR:
|
||||
export SHELL := bash
|
||||
export SHELLOPTS := pipefail:errexit
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rule
|
||||
.PHONY: pull docs docs-quick docs-no-pull docs-test docs-local-static
|
||||
|
||||
include docs.mk
|
||||
PODMAN = $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)
|
||||
IMAGE = grafana/docs-base:latest
|
||||
CONTENT_PATH = /hugo/content/docs/grafana/latest
|
||||
LOCAL_STATIC_PATH = ../../website/static
|
||||
PORT = 3002:3002
|
||||
|
||||
pull:
|
||||
$(PODMAN) pull $(IMAGE)
|
||||
|
||||
docs: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server
|
||||
|
||||
docs-preview: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server BUILD_DRAFTS=true
|
||||
|
||||
docs-no-pull:
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server
|
||||
|
||||
docs-test: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) make prod
|
||||
|
||||
# expects that you have grafana/website checked out in same path as the grafana repo.
|
||||
docs-local-static: pull
|
||||
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
|
||||
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
|
||||
|
||||
.PHONY: doc-validator/%
|
||||
doc-validator/%: ## Run doc-validator on a specific path. To lint the path /docs/sources/administration, run 'make doc-validator/administration'.
|
||||
doc-validator/%:
|
||||
$(PODMAN) run --init -v "$(shell pwd)/sources:/sources" grafana/doc-validator:latest --skip-image-validation --include=$(subst doc-validator/,,$@) ./sources /docs/grafana/latest
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
# Building the docs locally
|
||||
|
||||
When you contribute to documentation, it's a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
|
||||
|
||||
To build a local version, you need to run a process in a Docker container.
|
||||
Grafana periodically updates the Docker image, [`docs-base`](https://hub.docker.com/r/grafana/docs-base), to update the styling of the Docs.
|
||||
When you contribute to documentation, it is a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Docker >= 2.1.0.3
|
||||
- Yarn >= 1.22.4
|
||||
Docker >= 2.1.0.3
|
||||
Yarn >= 1.22.4
|
||||
|
||||
## Build the doc site
|
||||
|
||||
First, make sure the Docker daemon is running on your machine. Then, follow these steps:
|
||||
|
||||
1. On the command line, first change to the docs folder: `cd docs`.
|
||||
1. Run `make docs`. This launches a preview of the website with the current grafana docs at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes are made to content in the `sources` directory.
|
||||
|
||||
|
||||
117
docs/docs.mk
117
docs/docs.mk
@@ -1,117 +0,0 @@
|
||||
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk.
|
||||
# A changelog is included in the head of the `make-docs` script.
|
||||
include variables.mk
|
||||
-include variables.mk.local
|
||||
|
||||
.ONESHELL:
|
||||
.DELETE_ON_ERROR:
|
||||
export SHELL := bash
|
||||
export SHELLOPTS := pipefail:errexit
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rule
|
||||
|
||||
.DEFAULT_GOAL: help
|
||||
|
||||
# Adapted from https://www.thapaliya.com/en/writings/well-documented-makefiles/
|
||||
.PHONY: help
|
||||
help: ## Display this help.
|
||||
help:
|
||||
@awk 'BEGIN { \
|
||||
FS = ": ##"; \
|
||||
printf "Usage:\n make <target>\n\nTargets:\n" \
|
||||
} \
|
||||
/^[a-zA-Z0-9_\.\-\/%]+: ##/ { printf " %-15s %s\n", $$1, $$2 }' \
|
||||
$(MAKEFILE_LIST)
|
||||
|
||||
GIT_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
|
||||
PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)
|
||||
|
||||
ifeq ($(PROJECTS),)
|
||||
$(error "PROJECTS variable must be defined in variables.mk")
|
||||
endif
|
||||
|
||||
# First project is considered the primary one used for doc-validator.
|
||||
PRIMARY_PROJECT := $(subst /,-,$(firstword $(subst :, ,$(firstword $(PROJECTS)))))
|
||||
|
||||
# Name for the container.
|
||||
ifeq ($(origin DOCS_CONTAINER), undefined)
|
||||
export DOCS_CONTAINER := $(PRIMARY_PROJECT)-docs
|
||||
endif
|
||||
|
||||
# Host port to publish container port to.
|
||||
ifeq ($(origin DOCS_HOST_PORT), undefined)
|
||||
export DOCS_HOST_PORT := 3002
|
||||
endif
|
||||
|
||||
# Container image used to perform Hugo build.
|
||||
ifeq ($(origin DOCS_IMAGE), undefined)
|
||||
export DOCS_IMAGE := grafana/docs-base:latest
|
||||
endif
|
||||
|
||||
# Container image used for doc-validator linting.
|
||||
ifeq ($(origin DOC_VALIDATOR_IMAGE), undefined)
|
||||
export DOC_VALIDATOR_IMAGE := grafana/doc-validator:latest
|
||||
endif
|
||||
|
||||
# Container image used for vale linting.
|
||||
ifeq ($(origin VALE_IMAGE), undefined)
|
||||
export VALE_IMAGE := grafana/vale:latest
|
||||
endif
|
||||
|
||||
# PATH-like list of directories within which to find projects.
|
||||
# If all projects are checked out into the same directory, ~/repos/ for example, then the default should work.
|
||||
ifeq ($(origin REPOS_PATH), undefined)
|
||||
export REPOS_PATH := $(realpath $(GIT_ROOT)/..)
|
||||
endif
|
||||
|
||||
# How to treat Hugo relref errors.
|
||||
ifeq ($(origin HUGO_REFLINKSERRORLEVEL), undefined)
|
||||
export HUGO_REFLINKSERRORLEVEL := WARNING
|
||||
endif
|
||||
|
||||
.PHONY: docs-rm
|
||||
docs-rm: ## Remove the docs container.
|
||||
$(PODMAN) rm -f $(DOCS_CONTAINER)
|
||||
|
||||
.PHONY: docs-pull
|
||||
docs-pull: ## Pull documentation base image.
|
||||
$(PODMAN) pull -q $(DOCS_IMAGE)
|
||||
|
||||
make-docs: ## Fetch the latest make-docs script.
|
||||
make-docs:
|
||||
if [[ ! -f "$(CURDIR)/make-docs" ]]; then
|
||||
echo 'WARN: No make-docs script found in the working directory. Run `make update` to download it.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
.PHONY: docs
|
||||
docs: ## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
|
||||
docs: docs-pull make-docs
|
||||
$(CURDIR)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: docs-no-pull
|
||||
docs-no-pull: ## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
|
||||
docs-no-pull: make-docs
|
||||
$(CURDIR)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: docs-debug
|
||||
docs-debug: ## Run Hugo web server with debugging enabled. TODO: support all SERVER_FLAGS defined in website Makefile.
|
||||
docs-debug: make-docs
|
||||
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug' $(CURDIR)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: doc-validator
|
||||
doc-validator: ## Run doc-validator on the entire docs folder.
|
||||
doc-validator: make-docs
|
||||
DOCS_IMAGE=$(DOC_VALIDATOR_IMAGE) $(CURDIR)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: vale
|
||||
vale: ## Run vale on the entire docs folder.
|
||||
vale: make-docs
|
||||
DOCS_IMAGE=$(VALE_IMAGE) $(CURDIR)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: update
|
||||
update: ## Fetch the latest version of this Makefile and the `make-docs` script from Writers' Toolkit.
|
||||
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
|
||||
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
|
||||
chmod +x make-docs
|
||||
656
docs/make-docs
656
docs/make-docs
@@ -1,656 +0,0 @@
|
||||
#!/bin/sh
|
||||
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs.
|
||||
# # `make-docs` procedure changelog
|
||||
#
|
||||
# Updates should conform to the guidelines in https://keepachangelog.com/en/1.1.0/.
|
||||
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
||||
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
||||
|
||||
# ## 4.2.1 (2023-09-13)
|
||||
|
||||
# ## Fixed
|
||||
|
||||
# - Improved consistency of the webserver request loop by polling the Hugo port rather than the proxy port.
|
||||
|
||||
# ## 4.2.0 (2023-09-01)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Retry the initial webserver request up to ten times to allow for the process to start.
|
||||
# If it is still failing after ten seconds, an error message is logged.
|
||||
|
||||
# ## 4.1.1 (2023-07-20)
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Replaced use of `realpath` with POSIX compatible alternative to determine default value for REPOS_PATH.
|
||||
|
||||
# ## 4.1.0 (2023-06-16)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Mounts of `layouts` and `config` directories for the `website` project.
|
||||
# Ensures that local changes to mounts or shortcodes are reflected in the development server.
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Version inference for versioned docs pages.
|
||||
# Pages in versioned projects now have the `versioned: true` front matter set to ensure that "version" in $.Page.Scratch is set on builds.
|
||||
|
||||
# ## 4.0.0 (2023-06-06)
|
||||
|
||||
# ### Removed
|
||||
|
||||
# - `doc-validator/%` target.
|
||||
# The behavior of the target was not as described.
|
||||
# Instead, to limit `doc-validator` to only specific files, refer to https://grafana.com/docs/writers-toolkit/writing-guide/tooling-and-workflows/validate-technical-documentation/#run-on-specific-files.
|
||||
|
||||
# ## 3.0.0 (2023-05-18)
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Compatibility with the updated Make targets in the `website` repository.
|
||||
# `docs` now runs this script itself, `server-docs` builds the site with the `docs` Hugo environment.
|
||||
|
||||
# ## 2.0.0 (2023-05-18)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Support for the grafana-cloud/frontend-observability/faro-web-sdk project.
|
||||
# - Use of `doc-validator` v2.0.x which includes breaking changes to command line options.
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Source grafana-cloud project from website repository.
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Support for running the Vale linter with `make vale`.
|
||||
|
||||
# ## 1.2.1 (2023-05-05)
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Use `latest` tag of `grafana/vale` image by default instead of hardcoded older version.
|
||||
# - Fix mounting multiple projects broken by the changes in 1.0.1
|
||||
|
||||
# ## 1.2.0 (2023-05-05)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Support for running the Vale linter with `make vale`.
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# ## 1.1.0 (2023-05-05)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Rewrite error output so it can be followed by text editors.
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Fix `docs-debug` container process port.
|
||||
|
||||
# ## 1.0.1 (2023-05-04)
|
||||
|
||||
# ### Fixed
|
||||
|
||||
# - Ensure complete section hierarchy so that all projects have a visible menu.
|
||||
|
||||
# ## 1.0.0 (2023-05-04)
|
||||
|
||||
# ### Added
|
||||
|
||||
# - Build multiple projects simultaneously if all projects are checked out locally.
|
||||
# - Run [`doc-validator`](https://github.com/grafana/technical-documentation/tree/main/tools/cmd/doc-validator) over projects.
|
||||
# - Redirect project root to mounted version.
|
||||
# For example redirect `/docs/grafana/` to `/docs/grafana/latest/`.
|
||||
# - Support for Podman or Docker containers with `PODMAN` environment variable.
|
||||
# - Support for projects:
|
||||
# - agent
|
||||
# - enterprise-logs
|
||||
# - enterprise-metrics
|
||||
# - enterprise-traces
|
||||
# - grafana
|
||||
# - grafana-cloud
|
||||
# - grafana-cloud/machine-learning
|
||||
# - helm-charts/mimir-distributed
|
||||
# - helm-charts/tempo-distributed
|
||||
# - incident
|
||||
# - loki
|
||||
# - mimir
|
||||
# - oncall
|
||||
# - opentelemetry
|
||||
# - phlare
|
||||
# - plugins
|
||||
# - slo
|
||||
# - tempo
|
||||
# - writers-toolkit
|
||||
|
||||
|
||||
set -ef
|
||||
|
||||
readonly DOCS_CONTAINER="${DOCS_CONTAINER:-make-docs}"
|
||||
readonly DOCS_HOST_PORT="${DOCS_HOST_PORT:-3002}"
|
||||
readonly DOCS_IMAGE="${DOCS_IMAGE:-grafana/docs-base:latest}"
|
||||
|
||||
readonly DOC_VALIDATOR_INCLUDE="${DOC_VALIDATOR_INCLUDE:-.+\.md$}"
|
||||
readonly DOC_VALIDATOR_SKIP_CHECKS="${DOC_VALIDATOR_SKIP_CHECKS:-^image-}"
|
||||
|
||||
readonly HUGO_REFLINKSERRORLEVEL="${HUGO_REFLINKSERRORLEVEL:-WARNING}"
|
||||
readonly VALE_MINALERTLEVEL="${VALE_MINALERTLEVEL:-error}"
|
||||
readonly WEBSITE_EXEC="${WEBSITE_EXEC:-make server-docs}"
|
||||
# If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
|
||||
readonly WEBSITE_MOUNTS="${WEBSITE_MOUNTS:-}"
|
||||
|
||||
PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)"
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
if ! command -v wget >/dev/null 2>&1; then
|
||||
errr 'either `curl` or `wget` must be installed for this script to work.'
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v "${PODMAN}" >/dev/null 2>&1; then
|
||||
errr 'either `podman` or `docker` must be installed for this script to work.'
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
about() {
|
||||
cat <<EOF
|
||||
Test documentation locally with multiple source repositories.
|
||||
|
||||
The REPOS_PATH environment variable is a colon (:) separated list of paths in which to look for project repositories.
|
||||
EOF
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage:
|
||||
REPOS_PATH=<PATH[:<PATH>...]> $0 [<PROJECT>[:<VERSION>[:<REPO>[:<DIR>]]]...]
|
||||
|
||||
Examples:
|
||||
REPOS_PATH=~/ext/grafana/ $0 writers-toolkit tempo:latest helm-charts/mimir-distributed:latest:mimir:docs/sources/mimir-distributed
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF >&2
|
||||
ERRR: arguments required but not supplied.
|
||||
|
||||
$(about)
|
||||
|
||||
$(usage)
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
readonly REPOS_PATH="${REPOS_PATH:-$(cd "$(git rev-parse --show-toplevel)/.." && echo "${PWD}")}"
|
||||
|
||||
if [ -z "${REPOS_PATH}" ]; then
|
||||
cat <<EOF >&2
|
||||
ERRR: REPOS_PATH environment variable is required but has not been provided.
|
||||
|
||||
$(usage)
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOURCES_as_code='as-code-docs'
|
||||
SOURCES_enterprise_metrics='backend-enterprise'
|
||||
SOURCES_enterprise_metrics_='backend-enterprise'
|
||||
SOURCES_grafana_cloud='website'
|
||||
SOURCES_grafana_cloud_alerting_and_irm_machine_learning='machine-learning'
|
||||
SOURCES_grafana_cloud_alerting_and_irm_slo='slo'
|
||||
SOURCES_grafana_cloud_k6='k6-docs'
|
||||
SOURCES_grafana_cloud_data_configuration_integrations='cloud-onboarding'
|
||||
SOURCES_grafana_cloud_frontend_observability_faro_web_sdk='faro-web-sdk'
|
||||
SOURCES_helm_charts_mimir_distributed='mimir'
|
||||
SOURCES_helm_charts_tempo_distributed='tempo'
|
||||
SOURCES_opentelemetry='opentelemetry-docs'
|
||||
SOURCES_plugins_grafana_splunk_datasource='splunk-datasource'
|
||||
|
||||
VERSIONS_as_code='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_alerting_and_irm_machine_learning='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_alerting_and_irm_slo='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_k6='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED'
|
||||
VERSIONS_opentelemetry='UNVERSIONED'
|
||||
VERSIONS_technical_documentation='UNVERSIONED'
|
||||
VERSIONS_website='UNVERSIONED'
|
||||
VERSIONS_writers_toolkit='UNVERSIONED'
|
||||
|
||||
PATHS_grafana_cloud='content/docs/grafana-cloud'
|
||||
PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
|
||||
PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed'
|
||||
PATHS_mimir='docs/sources/mimir'
|
||||
PATHS_tempo='docs/sources/tempo'
|
||||
PATHS_website='content/docs'
|
||||
|
||||
# identifier STR
|
||||
# Replace characters that are not valid in an identifier with underscores.
|
||||
identifier() {
|
||||
echo "$1" | tr -C '[:alnum:]_\n' '_'
|
||||
}
|
||||
|
||||
# aget ARRAY KEY
|
||||
# Get the value of KEY from associative array ARRAY.
|
||||
# Characters that are not valid in an identifier are replaced with underscores.
|
||||
aget() {
|
||||
eval echo '$'"$(identifier "$1")_$(identifier "$2")"
|
||||
}
|
||||
|
||||
# new_proj populates a new project structure.
|
||||
new_proj() {
|
||||
_project="$1"
|
||||
_version="$2"
|
||||
_repo="$3"
|
||||
_path="$4"
|
||||
|
||||
# If version is not set, use the script mapping of project to default versions if it exists.
|
||||
# Fallback to 'latest'.
|
||||
if [ -z "${_version}" ]; then
|
||||
if [ -z "$(aget VERSIONS "${_project}")" ]; then
|
||||
_version=latest
|
||||
else
|
||||
_version="$(aget VERSIONS "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If repo is not set, use the script mapping of project to repo name if it exists.
|
||||
# Fallback to using the project name.
|
||||
if [ -z "${_repo}" ]; then
|
||||
if [ -z "$(aget SOURCES "${_project}")" ]; then
|
||||
_repo="${_project}"
|
||||
else
|
||||
_repo="$(aget SOURCES "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If path is not set, use the script mapping of project to docs sources path if it exists.
|
||||
# Fallback to using 'docs/sources'.
|
||||
if [ -z "${_path}" ]; then
|
||||
if [ -z "$(aget PATHS "${_project}")" ]; then
|
||||
_path="docs/sources"
|
||||
else
|
||||
_path="$(aget PATHS "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "${_project}:${_version}:${_repo}:${_path}"
|
||||
unset _project _version _repo _path
|
||||
}
|
||||
|
||||
# proj_url returns the webserver URL for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_url() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/"
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/${_project}/"
|
||||
else
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/${_project}/${_version}/"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
# proj_ver returns the version for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_ver() {
|
||||
IFS=: read -r _ _ver _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
echo "${_ver}"
|
||||
unset _ver
|
||||
}
|
||||
|
||||
# proj_dst returns the container path to content source for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_dst() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo '/hugo/content/docs'
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "/hugo/content/docs/${_project}"
|
||||
else
|
||||
echo "/hugo/content/docs/${_project}/${_version}"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
# repo_path returns the host path to the project repository.
|
||||
# It looks for the provided repository name in each of the paths specified in the REPOS_PATH environment variable.
|
||||
repo_path() {
|
||||
_repo="$1"
|
||||
IFS=:
|
||||
for lookup in ${REPOS_PATH}; do
|
||||
if [ -d "${lookup}/${_repo}" ]; then
|
||||
echo "${lookup}/${_repo}"
|
||||
unset _path _repo
|
||||
return
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
|
||||
errr "could not find project '${_repo}' in any of the paths in REPOS_PATH '${REPOS_PATH}'."
|
||||
note "you must have a checkout of the project '${_repo}' at '${REPOS_PATH##:*}/${_repo}'."
|
||||
note "if you have cloned the repository into a directory with a different name, consider changing it to ${_repo}."
|
||||
|
||||
unset _repo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# proj_src returns the host path to content source for a project.
|
||||
# It expects a complete project structure as input.
|
||||
# It looks for the provided repository name in each of the paths specified in the REPOS_PATH environment variable.
|
||||
proj_src() {
|
||||
IFS=: read -r _ _ _repo _path <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
_repo="$(repo_path "${_repo}")"
|
||||
echo "${_repo}/${_path}"
|
||||
|
||||
unset _path _repo
|
||||
}
|
||||
|
||||
# proj_canonical returns the canonical absolute path partial URI for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_canonical() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo '/docs'
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "/docs/${_project}"
|
||||
else
|
||||
echo "/docs/${_project}/${_version}"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
proj_to_url_src_dst_ver() {
|
||||
_url="$(proj_url "$1")"
|
||||
_src="$(proj_src "$1")"
|
||||
_dst="$(proj_dst "$1")"
|
||||
_ver="$(proj_ver "$1")"
|
||||
|
||||
echo "${_url}^${_src}^${_dst}^${_ver}"
|
||||
unset _url _src _dst _ver
|
||||
}
|
||||
|
||||
url_src_dst_vers() {
|
||||
for arg in "$@"; do
|
||||
IFS=: read -r _project _version _repo _path <<POSIX_HERESTRING
|
||||
$arg
|
||||
POSIX_HERESTRING
|
||||
|
||||
case "${_project}" in
|
||||
# Workaround for arbitrary mounts where the version field is expected to be the local directory
|
||||
# and the repo field is expected to be the container directory.
|
||||
arbitrary)
|
||||
echo "${_project}^${_version}^${_repo}^" # TODO
|
||||
;;
|
||||
logs)
|
||||
proj_to_url_src_dst_ver "$(new_proj loki "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-logs "${_version}")"
|
||||
;;
|
||||
metrics)
|
||||
proj_to_url_src_dst_ver "$(new_proj mimir "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj helm-charts/mimir-distributed "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-metrics "${_version}")"
|
||||
;;
|
||||
traces)
|
||||
proj_to_url_src_dst_ver "$(new_proj tempo "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-traces "${_version}")"
|
||||
;;
|
||||
*)
|
||||
proj_to_url_src_dst_ver "$(new_proj "${_project}" "${_version}" "${_repo}" "${_path}")"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
unset _project _version _repo _path
|
||||
}
|
||||
|
||||
await_build() {
|
||||
url="$1"
|
||||
req="$(if command -v curl >/dev/null 2>&1; then echo 'curl -s -o /dev/null'; else echo 'wget -q'; fi)"
|
||||
|
||||
i=1
|
||||
max=10
|
||||
while [ "${i}" -ne "${max}" ]
|
||||
do
|
||||
sleep 1
|
||||
debg "Retrying request to webserver assuming the process is still starting up."
|
||||
i=$((i + 1))
|
||||
|
||||
if ${req} "${url}"; then
|
||||
echo
|
||||
echo "View documentation locally:"
|
||||
for x in ${url_src_dst_vers}; do
|
||||
IFS='^' read -r url _ _ <<POSIX_HERESTRING
|
||||
$x
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ -n "${url}" ]; then
|
||||
if [ "${_url}" != "arbitrary" ]; then
|
||||
echo " ${url}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo
|
||||
echo 'Press Ctrl+c to stop the server'
|
||||
|
||||
unset i max req url
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
errr 'The build was interrupted or a build error occurred, check the previous logs for possible causes.'
|
||||
note 'You might need to use Ctrl+c to end the process.'
|
||||
|
||||
unset i max req url
|
||||
}
|
||||
|
||||
debg() {
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
echo "DEBG: $1" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
errr() {
|
||||
echo "ERRR: $1" >&2
|
||||
}
|
||||
|
||||
note() {
|
||||
echo "NOTE: $1" >&2
|
||||
}
|
||||
|
||||
url_src_dst_vers="$(url_src_dst_vers "$@")"
|
||||
|
||||
volumes=""
|
||||
redirects=""
|
||||
|
||||
for arg in "$@"; do
|
||||
IFS=: read -r _project _ _repo _ <<POSIX_HERESTRING
|
||||
${arg}
|
||||
POSIX_HERESTRING
|
||||
if [ "${_project}" = website ]; then
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config"
|
||||
volumes="${volumes} --volume=${_repo}/layouts/partials:/hugo/layouts/partials"
|
||||
volumes="${volumes} --volume=${_repo}/layouts/shortcodes:/hugo/layouts/shortcodes"
|
||||
fi
|
||||
unset _project _repo
|
||||
done
|
||||
|
||||
for x in ${url_src_dst_vers}; do
|
||||
IFS='^' read -r _url _src _dst _ver <<POSIX_HERESTRING
|
||||
$x
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_url}" != "arbitrary" ]; then
|
||||
if [ ! -f "${_src}/_index.md" ]; then
|
||||
errr "Index file '${_src}/_index.md' does not exist."
|
||||
note "Is '${_src}' the correct source directory?"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
debg "DEBG: Mounting '${_src}' at container path '${_dst}'"
|
||||
|
||||
if [ -z "${volumes}" ]; then
|
||||
volumes="--volume=${_src}:${_dst}"
|
||||
else
|
||||
volumes="${volumes} --volume=${_src}:${_dst}"
|
||||
fi
|
||||
|
||||
if [ -n "${_ver}" ] && [ "${_ver}" != 'UNVERSIONED' ]; then
|
||||
if [ -z "${redirects}" ]; then
|
||||
redirects="${_dst}^${_ver}"
|
||||
else
|
||||
redirects="${redirects} ${_dst}^${_ver}"
|
||||
fi
|
||||
fi
|
||||
unset _url _src _dst _ver
|
||||
done
|
||||
|
||||
IFS=':' read -r image _ <<POSIX_HERESTRING
|
||||
${DOCS_IMAGE}
|
||||
POSIX_HERESTRING
|
||||
|
||||
case "${image}" in
|
||||
'grafana/doc-validator')
|
||||
proj="$(new_proj "$1")"
|
||||
echo
|
||||
"${PODMAN}" run \
|
||||
--init \
|
||||
--interactive \
|
||||
--name "${DOCS_CONTAINER}" \
|
||||
--platform linux/amd64 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
"${DOCS_IMAGE}" \
|
||||
"--include=${DOC_VALIDATOR_INCLUDE}" \
|
||||
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
|
||||
/hugo/content/docs \
|
||||
"$(proj_canonical "${proj}")" | sed "s#$(proj_dst "${proj}")#sources#"
|
||||
;;
|
||||
'grafana/vale')
|
||||
proj="$(new_proj "$1")"
|
||||
echo
|
||||
"${PODMAN}" run \
|
||||
--init \
|
||||
--interactive \
|
||||
--name "${DOCS_CONTAINER}" \
|
||||
--platform linux/amd64 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
"${DOCS_IMAGE}" \
|
||||
"--minAlertLevel=${VALE_MINALERTLEVEL}" \
|
||||
--config=/etc/vale/.vale.ini \
|
||||
--output=line \
|
||||
/hugo/content/docs | sed "s#$(proj_dst "${proj}")#sources#"
|
||||
;;
|
||||
*)
|
||||
tempfile="$(mktemp -t make-docs.XXX)"
|
||||
cat <<EOF >"${tempfile}"
|
||||
#!/usr/bin/env bash
|
||||
for redirect in ${redirects}; do
|
||||
IFS='^' read -r path ver <<<"\${redirect}"
|
||||
echo -e "---\\nredirectURL: \"\${path/\/hugo\/content/}\"\\ntype: redirect\\nversioned: true\\n---\\n" > "\${path/\${ver}/_index.md}"
|
||||
done
|
||||
|
||||
for x in "${url_src_dst_vers}"; do
|
||||
IFS='^' read -r _ _ dst _ <<<"\${x}"
|
||||
|
||||
while [[ -n "\${dst}" ]]; do
|
||||
touch "\${dst}/_index.md"
|
||||
dst="\${dst%/*}"
|
||||
done
|
||||
done
|
||||
|
||||
if [[ -n "${WEBSITE_MOUNTS}" ]]; then
|
||||
unset WEBSITE_SKIP_MOUNTS
|
||||
fi
|
||||
|
||||
${WEBSITE_EXEC}
|
||||
EOF
|
||||
chmod +x "${tempfile}"
|
||||
volumes="${volumes} --volume=${tempfile}:/entrypoint"
|
||||
readonly volumes
|
||||
|
||||
IFS='' read -r cmd <<EOF
|
||||
${PODMAN} run \
|
||||
--env=HUGO_REFLINKSERRORLEVEL=${HUGO_REFLINKSERRORLEVEL} \
|
||||
--init \
|
||||
--interactive \
|
||||
--name=${DOCS_CONTAINER} \
|
||||
--platform=linux/amd64 \
|
||||
--publish=${DOCS_HOST_PORT}:3002 \
|
||||
--publish=3003:3003 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
${DOCS_IMAGE} \
|
||||
/entrypoint
|
||||
EOF
|
||||
await_build http://localhost:3003 &
|
||||
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
${cmd}
|
||||
else
|
||||
${cmd} 2>&1| sed \
|
||||
-e '/Web Server is available at http:\/\/localhost:3003\/ (bind address 0.0.0.0)/ d' \
|
||||
-e '/^hugo server/ d' \
|
||||
-e '/fatal: not a git repository (or any parent up to mount point \/)/ d' \
|
||||
-e '/Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)./ d' \
|
||||
-e "/Makefile:[0-9]*: warning: overriding recipe for target 'docs'/ d" \
|
||||
-e "/docs.mk:[0-9]*: warning: ignoring old recipe for target 'docs'/ d" \
|
||||
-e '/\/usr\/bin\/make -j 2 proxy hserver-docs HUGO_PORT=3003/ d' \
|
||||
-e '/website-proxy/ d' \
|
||||
-e '/rm -rf dist*/ d' \
|
||||
-e '/Press Ctrl+C to stop/ d' \
|
||||
-e '/make/ d' || echo
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -3,192 +3,6 @@ aliases:
|
||||
- /docs/grafana/v1.1/
|
||||
- /docs/grafana/v3.1/
|
||||
- guides/reference/admin/
|
||||
cascade:
|
||||
# Until a better mechanism for arrangement is thought of, the following sequence should be ordered alphabetically by the `_target.path` value.
|
||||
- _target: { path: /docs/grafana/** } # Default to every page having "Enterprise" and "Open source" labels.
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/enterprise-licensing/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/organization-management/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/provisioning/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/recorded-queries/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/roles-and-permissions/access-control/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/stats-and-license/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/alerting/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/dashboards/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/datasources/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/explore/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/fundamentals/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/introduction/grafana-cloud/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
|
||||
- _target: { path: /docs/grafana/*/introduction/grafana-enterprise/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/panels-visualizations/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/release-notes/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/search/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/audit-grafana/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/enhanced-ldap/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/saml/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target:
|
||||
path: /docs/grafana/*/setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault/**
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-request-security/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-team-sync/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/export-logs/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/troubleshooting/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/whatsnew/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
description: Guides, installation, and feature documentation
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -226,7 +40,7 @@ title: Grafana documentation
|
||||
</div>
|
||||
<h5>Grafana Cloud</h5>
|
||||
</a>
|
||||
<a href="https://grafana.com/grafana/download/nightly?edition=oss" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="https://grafana.com/grafana/nightly?edition=oss" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-moon-o">
|
||||
</div>
|
||||
<h5>Nightly builds</h5>
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
---
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
description: Administration
|
||||
title: Administration
|
||||
weight: 40
|
||||
|
||||
@@ -127,7 +127,7 @@ Complete the following steps to migrate from API keys to service accounts using
|
||||
This action generates a service account token.
|
||||
|
||||
1. Store the ID and secret that the system returns to you.
|
||||
1. Pass the token in the `Authorization` header, prefixed with `Bearer`.
|
||||
1. Pass the token in the `Authrorization` header, prefixed with `Bearer`.
|
||||
|
||||
This action authenticates API requests.
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
description: Describes how to back up a locally provisioned Grafana instance.
|
||||
keywords:
|
||||
- grafana
|
||||
- backup
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Back up Grafana
|
||||
weight: 80
|
||||
menuTitle: Back up Grafana
|
||||
---
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
@@ -8,6 +8,10 @@ aliases:
|
||||
- ../enterprise/license/license-expiration/
|
||||
- ../enterprise/license/license-restrictions/
|
||||
- license-restrictions/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
description: Activate and manage a Grafana Enterprise license
|
||||
keywords:
|
||||
- grafana
|
||||
|
||||
@@ -8,6 +8,10 @@ description: Describes how to use organizations to isolate dashboard to users an
|
||||
keywords:
|
||||
- organizations
|
||||
- dashboards
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Manage organizations
|
||||
title: Manage organizations
|
||||
weight: 200
|
||||
|
||||
@@ -13,7 +13,7 @@ weight: 600
|
||||
|
||||
Besides the wide range of visualizations and data sources that are available immediately after you install Grafana, you can extend your Grafana experience with _plugins_.
|
||||
|
||||
You can [install]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself](https://grafana.com/developers/plugin-tools).
|
||||
You can [install]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself]({{< relref "../../developers/plugins/" >}}).
|
||||
|
||||
Grafana supports three types of plugins: [panels](/grafana/plugins?type=panel), [data sources](/plugins?type=datasource), and [apps](/grafana/plugins?type=app).
|
||||
|
||||
@@ -165,7 +165,7 @@ Grafana also writes an error message to the server log:
|
||||
WARN[05-26|12:00:00] Some plugin scanning errors were found errors="plugin '<plugin id>' is unsigned, plugin '<plugin id>' has an invalid signature"
|
||||
```
|
||||
|
||||
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin](https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin).
|
||||
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin]({{< relref "../../developers/plugins/sign-a-plugin/" >}}).
|
||||
|
||||
| Signature status | Description |
|
||||
| ------------------ | ------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -5,6 +5,10 @@ description: Describes provisioning settings for Grafana using configuration fil
|
||||
keywords:
|
||||
- grafana
|
||||
- provisioning
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Provision Grafana
|
||||
weight: 600
|
||||
---
|
||||
@@ -56,8 +60,8 @@ Currently we do not provide any scripts/manifests for configuring Grafana. Rathe
|
||||
| Tool | Project |
|
||||
| --------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana) |
|
||||
| Ansible | [https://github.com/grafana/grafana-ansible-collection](https://github.com/grafana/grafana-ansible-collection) |
|
||||
| Chef | [https://github.com/sous-chefs/chef-grafana](https://github.com/sous-chefs/chef-grafana) |
|
||||
| Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana) |
|
||||
| Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana) |
|
||||
| Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana) |
|
||||
| Jsonnet | [https://github.com/grafana/grafonnet-lib/](https://github.com/grafana/grafonnet-lib/) |
|
||||
|
||||
@@ -351,8 +355,8 @@ When Grafana starts, it updates/inserts all dashboards available in the configur
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
> **Note:** Provisioning allows you to overwrite existing dashboards
|
||||
> which leads to problems if you reuse settings that are supposed to be unique.
|
||||
> Be careful not to reuse the same `title` multiple times within a folder
|
||||
> which leads to problems if you re-use settings that are supposed to be unique.
|
||||
> Be careful not to re-use the same `title` multiple times within a folder
|
||||
> or `uid` within the same installation as this will cause weird behaviors.
|
||||
|
||||
### Provision folders structure from filesystem to Grafana
|
||||
|
||||
@@ -7,6 +7,10 @@ keywords:
|
||||
- query
|
||||
- queries
|
||||
- recorded
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
title: Recorded queries
|
||||
weight: 300
|
||||
---
|
||||
|
||||
@@ -3,6 +3,11 @@ aliases:
|
||||
- ../../enterprise/access-control/
|
||||
- ../../enterprise/access-control/about-rbac/
|
||||
- ../../enterprise/access-control/roles/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
description: Role-based access control (RBAC) provides a standardized way of granting,
|
||||
changing, and revoking access so that users can view and modify Grafana resources,
|
||||
such as users and reports.
|
||||
|
||||
@@ -10,9 +10,7 @@ weight: 80
|
||||
|
||||
# RBAC permissions, actions, and scopes
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
|
||||
|
||||
A permission is comprised of an action and a scope. When creating a custom role, consider the actions the user can perform and the resource(s) on which they can perform those actions.
|
||||
|
||||
@@ -25,129 +23,128 @@ To learn more about the Grafana resources to which you can apply RBAC, refer to
|
||||
|
||||
The following list contains role-based access control actions.
|
||||
|
||||
| Action | Applicable scope | Description |
|
||||
| ------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances:create` | n/a | Create silences in the current organization. |
|
||||
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
|
||||
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
|
||||
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
|
||||
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
|
||||
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `annotations:create` | `annotations:*`<br>`annotations:type:*` | Create annotations. |
|
||||
| `annotations:delete` | `annotations:*`<br>`annotations:type:*` | Delete annotations. |
|
||||
| `annotations:read` | `annotations:*`<br>`annotations:type:*` | Read annotations and annotation tags. |
|
||||
| `annotations:write` | `annotations:*`<br>`annotations:type:*` | Update annotations. |
|
||||
| `apikeys:create` | n/a | Create API keys. |
|
||||
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
|
||||
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
|
||||
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders and their subfolders. |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
|
||||
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
|
||||
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
|
||||
| `dashboards.public:write` | `dashboards:*`<br>`dashboards:uid:*` | Write public dashboard configuration. |
|
||||
| `datasources.caching:read` | `datasources:*`<br>`datasources:uid:*` | Read data source query caching settings. |
|
||||
| `datasources.caching:write` | `datasources:*`<br>`datasources:uid:*` | Update data source query caching settings. |
|
||||
| `datasources:create` | n/a | Create data sources. |
|
||||
| `datasources:delete` | `datasources:*`<br>`datasources:uid:*` | Delete data sources. |
|
||||
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.insights:read` | n/a | Read data sources insights data. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
|
||||
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
|
||||
| `datasources:write` | `datasources:*`<br>`datasources:uid:*` | Update data sources. |
|
||||
| `folders.permissions:read` | `folders:*`<br>`folders:uid:*` | Read permissions for one or more folders and their subfolders. |
|
||||
| `folders.permissions:write` | `folders:*`<br>`folders:uid:*` | Update permissions for one or more folders and their subfolders. |
|
||||
| `folders:create` | n/a | Create folders in the root level. If granted together with `folders:write`, also allows creating subfolders under all folders that the user can update. |
|
||||
| `folders:delete` | `folders:*`<br>`folders:uid:*` | Delete one or more folders and their subfolders. |
|
||||
| `folders:read` | `folders:*`<br>`folders:uid:*` | Read one or more folders and their subfolders. |
|
||||
| `folders:write` | `folders:*`<br>`folders:uid:*` | Update one or more folders and their subfolders. If granted together with `folders:create` permission, also allows creating subfolders under these folders. |
|
||||
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
|
||||
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
|
||||
| `ldap.user:read` | n/a | Read users via LDAP. |
|
||||
| `ldap.user:sync` | n/a | Sync users via LDAP. |
|
||||
| `licensing.reports:read` | n/a | Get custom permission reports. |
|
||||
| `licensing:delete` | n/a | Delete the license token. |
|
||||
| `licensing:read` | n/a | Read licensing information. |
|
||||
| `licensing:write` | n/a | Update the license token. |
|
||||
| `org.users:write` | `users:*` <br> `users:id:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of a user. |
|
||||
| `org.users:add` | `users:*` | Add a user to an organization or invite a new user to an organization. |
|
||||
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
||||
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
||||
| `org:create` | n/a | Create an organization. |
|
||||
| `orgs.preferences:read` | `orgs:*` <br> `orgs:id:*` | Read organization preferences. |
|
||||
| `orgs.preferences:write` | `orgs:*` <br> `orgs:id:*` | Update organization preferences. |
|
||||
| `orgs.quotas:read` | `orgs:*` <br> `orgs:id:*` | Read organization quotas. |
|
||||
| `orgs.quotas:write` | `orgs:*` <br> `orgs:id:*` | Update organization quotas. |
|
||||
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
|
||||
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
|
||||
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
|
||||
| `plugins.app:access` | `plugins:*` <br> `plugins:id:*` | Access one or more application plugins (still enforcing the organization role) |
|
||||
| `plugins:install` | n/a | Install and uninstall plugins. |
|
||||
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
|
||||
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
|
||||
| `reports:create` | n/a | Create reports. |
|
||||
| `reports:write` | `reports:*` <br> `reports:id:*` | Update reports. |
|
||||
| `reports.settings:read` | n/a | Read report settings. |
|
||||
| `reports.settings:write` | n/a | Update report settings. |
|
||||
| `reports:delete` | `reports:*` <br> `reports:id:*` | Delete reports. |
|
||||
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
|
||||
| `reports:send` | `reports:*` | Send a report email. |
|
||||
| `roles:delete` | `permissions:type:delegate` | Delete a custom role. |
|
||||
| `roles:read` | `roles:*` <br> `roles:uid:*` | List roles and read a specific with its permissions. |
|
||||
| `roles:write` | `permissions:type:delegate` | Create or update a custom role. |
|
||||
| `roles:write` | `permissions:type:escalate` | Reset basic roles to their default permissions. |
|
||||
| `server.stats:read` | n/a | Read Grafana instance statistics. |
|
||||
| `serviceaccounts:write` | `serviceaccounts:*` | Create Grafana service accounts. |
|
||||
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
|
||||
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
|
||||
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
|
||||
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
|
||||
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
|
||||
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../../../setup-grafana/configure-grafana/" >}}) |
|
||||
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
|
||||
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
|
||||
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and Team Sync setup for teams. |
|
||||
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage Team Sync setup for teams. |
|
||||
| `teams.roles:add` | `permissions:type:delegate` | Assign a role to a team. |
|
||||
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
|
||||
| `teams.roles:remove` | `permissions:type:delegate` | Unassign a role from a team. |
|
||||
| `teams:create` | n/a | Create teams. |
|
||||
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
|
||||
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
|
||||
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
|
||||
| `users.authtoken:read` | `global.users:*` <br> `global.users:id:*` | List authentication tokens that are assigned to a user. |
|
||||
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
|
||||
| `users.password:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s password. |
|
||||
| `users.permissions:read` | `users:*` | List permissions of a user. |
|
||||
| `users.permissions:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s organization-level permissions. |
|
||||
| `users.quotas:read` | `global.users:*` <br> `global.users:id:*` | List a user’s quotas. |
|
||||
| `users.quotas:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s quotas. |
|
||||
| `users.roles:add` | `permissions:type:delegate` | Assign a role to a user or a service account. |
|
||||
| `users.roles:read` | `users:*` | List roles assigned directly to a user or a service account. |
|
||||
| `users.roles:remove` | `permissions:type:delegate` | Unassign a role from a user or a service account. |
|
||||
| `users:create` | n/a | Create a user. |
|
||||
| `users:delete` | `global.users:*` <br> `global.users:id:*` | Delete a user. |
|
||||
| `users:disable` | `global.users:*` <br> `global.users:id:*` | Disable a user. |
|
||||
| `users:enable` | `global.users:*` <br> `global.users:id:*` | Enable a user. |
|
||||
| `users:logout` | `global.users:*` <br> `global.users:id:*` | Sign out a user. |
|
||||
| `users:read` | `global.users:*` | Read or search user profiles. |
|
||||
| `users:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s profile. |
|
||||
| Action | Applicable scope | Description |
|
||||
| ------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances:create` | n/a | Create silences in the current organization. |
|
||||
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
|
||||
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
|
||||
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
|
||||
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
|
||||
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `annotations:create` | `annotations:*`<br>`annotations:type:*` | Create annotations. |
|
||||
| `annotations:delete` | `annotations:*`<br>`annotations:type:*` | Delete annotations. |
|
||||
| `annotations:read` | `annotations:*`<br>`annotations:type:*` | Read annotations and annotation tags. |
|
||||
| `annotations:write` | `annotations:*`<br>`annotations:type:*` | Update annotations. |
|
||||
| `apikeys:create` | n/a | Create API keys. |
|
||||
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
|
||||
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
|
||||
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders. |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
|
||||
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
|
||||
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
|
||||
| `datasources.caching:read` | `datasources:*`<br>`datasources:uid:*` | Read data source query caching settings. |
|
||||
| `datasources.caching:write` | `datasources:*`<br>`datasources:uid:*` | Update data source query caching settings. |
|
||||
| `datasources:create` | n/a | Create data sources. |
|
||||
| `datasources:delete` | `datasources:*`<br>`datasources:uid:*` | Delete data sources. |
|
||||
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.insights:read` | n/a | Read data sources insights data. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
|
||||
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
|
||||
| `datasources:write` | `datasources:*`<br>`datasources:uid:*` | Update data sources. |
|
||||
| `folders.permissions:read` | `folders:*`<br>`folders:uid:*` | Read permissions for one or more folders. |
|
||||
| `folders.permissions:write` | `folders:*`<br>`folders:uid:*` | Update permissions for one or more folders. |
|
||||
| `folders:create` | n/a | Create folders. |
|
||||
| `folders:delete` | `folders:*`<br>`folders:uid:*` | Delete one or more folders. |
|
||||
| `folders:read` | `folders:*`<br>`folders:uid:*` | Read one or more folders. |
|
||||
| `folders:write` | `folders:*`<br>`folders:uid:*` | Update one or more folders. |
|
||||
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
|
||||
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
|
||||
| `ldap.user:read` | n/a | Read users via LDAP. |
|
||||
| `ldap.user:sync` | n/a | Sync users via LDAP. |
|
||||
| `licensing.reports:read` | n/a | Get custom permission reports. |
|
||||
| `licensing:delete` | n/a | Delete the license token. |
|
||||
| `licensing:read` | n/a | Read licensing information. |
|
||||
| `licensing:write` | n/a | Update the license token. |
|
||||
| `org.users:write` | `users:*` <br> `users:id:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of a user. |
|
||||
| `org.users:add` | `users:*` | Add a user to an organization or invite a new user to an organization. |
|
||||
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
||||
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
||||
| `org:create` | n/a | Create an organization. |
|
||||
| `orgs.preferences:read` | `orgs:*` <br> `orgs:id:*` | Read organization preferences. |
|
||||
| `orgs.preferences:write` | `orgs:*` <br> `orgs:id:*` | Update organization preferences. |
|
||||
| `orgs.quotas:read` | `orgs:*` <br> `orgs:id:*` | Read organization quotas. |
|
||||
| `orgs.quotas:write` | `orgs:*` <br> `orgs:id:*` | Update organization quotas. |
|
||||
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
|
||||
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
|
||||
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
|
||||
| `plugins.app:access` | `plugins:*` <br> `plugins:id:*` | Access one or more application plugins (still enforcing the organization role) |
|
||||
| `plugins:install` | n/a | Install and uninstall plugins. |
|
||||
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
|
||||
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
|
||||
| `reports:create` | n/a | Create reports. |
|
||||
| `reports:write` | `reports:*` <br> `reports:id:*` | Update reports. |
|
||||
| `reports.settings:read` | n/a | Read report settings. |
|
||||
| `reports.settings:write` | n/a | Update report settings. |
|
||||
| `reports:delete` | `reports:*` <br> `reports:id:*` | Delete reports. |
|
||||
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
|
||||
| `reports:send` | `reports:*` | Send a report email. |
|
||||
| `roles:delete` | `permissions:type:delegate` | Delete a custom role. |
|
||||
| `roles:read` | `roles:*` <br> `roles:uid:*` | List roles and read a specific with its permissions. |
|
||||
| `roles:write` | `permissions:type:delegate` | Create or update a custom role. |
|
||||
| `roles:write` | `permissions:type:escalate` | Reset basic roles to their default permissions. |
|
||||
| `server.stats:read` | n/a | Read Grafana instance statistics. |
|
||||
| `serviceaccounts:write` | `serviceaccounts:*` | Create Grafana service accounts. |
|
||||
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
|
||||
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
|
||||
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
|
||||
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
|
||||
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
|
||||
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../../../setup-grafana/configure-grafana/" >}}) |
|
||||
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
|
||||
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
|
||||
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and External Group Synchronization setup for teams. |
|
||||
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage External Group Synchronization setup for teams. |
|
||||
| `teams.roles:add` | `permissions:type:delegate` | Assign a role to a team. |
|
||||
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
|
||||
| `teams.roles:remove` | `permissions:type:delegate` | Unassign a role from a team. |
|
||||
| `teams:create` | n/a | Create teams. |
|
||||
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
|
||||
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
|
||||
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
|
||||
| `users.authtoken:read` | `global.users:*` <br> `global.users:id:*` | List authentication tokens that are assigned to a user. |
|
||||
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
|
||||
| `users.password:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s password. |
|
||||
| `users.permissions:read` | `users:*` | List permissions of a user. |
|
||||
| `users.permissions:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s organization-level permissions. |
|
||||
| `users.quotas:read` | `global.users:*` <br> `global.users:id:*` | List a user’s quotas. |
|
||||
| `users.quotas:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s quotas. |
|
||||
| `users.roles:add` | `permissions:type:delegate` | Assign a role to a user or a service account. |
|
||||
| `users.roles:read` | `users:*` | List roles assigned directly to a user or a service account. |
|
||||
| `users.roles:remove` | `permissions:type:delegate` | Unassign a role from a user or a service account. |
|
||||
| `users:create` | n/a | Create a user. |
|
||||
| `users:delete` | `global.users:*` <br> `global.users:id:*` | Delete a user. |
|
||||
| `users:disable` | `global.users:*` <br> `global.users:id:*` | Disable a user. |
|
||||
| `users:enable` | `global.users:*` <br> `global.users:id:*` | Enable a user. |
|
||||
| `users:logout` | `global.users:*` <br> `global.users:id:*` | Sign out a user. |
|
||||
| `users:read` | `global.users:*` | Read or search user profiles. |
|
||||
| `users:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s profile. |
|
||||
|
||||
### Grafana OnCall action definitions (beta)
|
||||
|
||||
@@ -196,7 +193,7 @@ The following list contains role-based access control scopes.
|
||||
| `apikeys:*`<br>`apikeys:id:*` | Restrict an action to a set of API keys. For example, `apikeys:*` matches any API key, `apikey:id:1` matches the API key whose id is `1`. |
|
||||
| `dashboards:*`<br>`dashboards:uid:*` | Restrict an action to a set of dashboards. For example, `dashboards:*` matches any dashboard, and `dashboards:uid:1` matches the dashboard whose UID is `1`. |
|
||||
| `datasources:*`<br>`datasources:uid:*` | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:uid:1` matches the data source whose UID is `1`. |
|
||||
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. Note that permissions granted to a folder cascade down to subfolders located under it |
|
||||
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. |
|
||||
| `global.users:*` <br> `global.users:id:*` | Restrict an action to a set of global users. For example, `global.users:*` matches any user and `global.users:id:1` matches the user whose ID is `1`. |
|
||||
| `orgs:*` <br> `orgs:id:*` | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
|
||||
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
|
||||
@@ -210,4 +207,3 @@ The following list contains role-based access control scopes.
|
||||
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
|
||||
| `teams:*` <br> `teams:id:*` | Restrict an action to a set of teams from an organization. For example, `teams:*` matches any team and `teams:id:1` matches the team whose ID is `1`. |
|
||||
| `users:*` <br> `users:id:*` | Restrict an action to a set of users from an organization. For example, `users:*` matches any user and `users:id:1` matches the user whose ID is `1`. |
|
||||
| `n/a` | `n/a` means not applicable. If an action has `n/a` specified for the scope, then the action does not require a scope. For example, the `teams:create` action does not require a scope and allows users to create teams. |
|
||||
|
||||
@@ -11,7 +11,11 @@ keywords:
|
||||
- configuration
|
||||
- server
|
||||
- settings
|
||||
title: View server statistics and license
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Stats and license
|
||||
weight: 400
|
||||
---
|
||||
|
||||
@@ -21,11 +25,11 @@ This setting contains information about tools that Grafana Server Admins can use
|
||||
|
||||
## View Grafana server settings
|
||||
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
|
||||
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana#configuration-file-location" >}}) file and any environmental variables.
|
||||
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana/#config-file-locations" >}}) file and any environmental variables.
|
||||
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
|
||||
### View server settings
|
||||
|
||||
@@ -34,15 +38,15 @@ If you are a Grafana server administrator, use the Settings tab to view the sett
|
||||
|
||||
### Available settings
|
||||
|
||||
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana#server" >}}).
|
||||
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).
|
||||
|
||||
## View Grafana server stats
|
||||
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
|
||||
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
|
||||
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
|
||||
### View server stats
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ weight: 500
|
||||
|
||||
# Manage dashboard permissions
|
||||
|
||||
Dashboard and dashboard folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
|
||||
Dashboard and dasboard folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
|
||||
|
||||
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
|
||||
> **Note**: It might be that you are currently in the proper organization and don't need to switch organizations.
|
||||
|
||||
1. Navigate to **Administration > Users**.
|
||||
1. Click **Organization users**.
|
||||
1. Click **Invite**.
|
||||
1. Enter the following information:
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
aliases:
|
||||
- about-alerting/
|
||||
- unified-alerting/alerting/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- oss
|
||||
title: Alerting
|
||||
weight: 114
|
||||
---
|
||||
|
||||
@@ -53,11 +53,11 @@ Alert summary:
|
||||
|
||||
You can use any of the following built-in template options to embed custom templates.
|
||||
|
||||
| Name | Notes |
|
||||
| ----------------------- | ------------------------------------------------------------ |
|
||||
| `default.title` | Displays high-level status information. |
|
||||
| `default.message` | Provides a formatted summary of firing and resolved alerts. |
|
||||
| `teams.default.message` | Similar to `default.message`, formatted for Microsoft Teams. |
|
||||
| Name | Notes |
|
||||
| ----------------------- | ------------------------------------------------------------- |
|
||||
| `default.title` | Displays high-level status information. |
|
||||
| `default.message` | Provides a formatted summary of firing and resolved alerts. |
|
||||
| `teams.default.message` | Similar to `default.messsage`, formatted for Microsoft Teams. |
|
||||
|
||||
### HTML in notification templates
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
aliases:
|
||||
- ../contact-points/
|
||||
- ../unified-alerting/contact-points/
|
||||
- contact-point-types/
|
||||
- /docs/grafana/latest/alerting/contact-points/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/contact-points/
|
||||
- /docs/grafana/latest/alerting/fundamentals/contact-points/contact-point-types/
|
||||
description: Create or edit contact point
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -54,6 +54,6 @@ The following table lists the contact point integrations supported by Grafana.
|
||||
|
||||
## Useful links
|
||||
|
||||
[Manage contact points](/docs/grafana/v9.5/alerting/manage-notifications/manage-contact-points/)
|
||||
[Manage contact points](/docs/grafana/latest/alerting/manage-notifications/create-contact-point/)
|
||||
|
||||
[Create and edit notification templates](/docs/grafana/v9.5/alerting/manage-notifications/template-notifications/create-notification-templates/)
|
||||
[Create and edit notification templates](/docs/grafana/latest/alerting/manage-notifications/template-notifications/create-notification-templates/)
|
||||
|
||||
@@ -23,7 +23,7 @@ Grafana managed alerts query the following backend data sources that have alerti
|
||||
|
||||
- built-in data sources or those developed and maintained by Grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Monitor`
|
||||
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](https://grafana.com/developers/plugin-tools/reference-plugin-json)
|
||||
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "/docs/grafana/latest/developers/plugins/metadata" >}}))
|
||||
|
||||
### Metrics from the alerting engine
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
title: Legacy alerting deprecation
|
||||
description: Legacy alerting deprecation notice
|
||||
weight: 999
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
---
|
||||
|
||||
# Legacy alerting deprecation
|
||||
|
||||
Starting with Grafana v9.0.0, legacy alerting is deprecated, meaning that it is no longer actively maintained or supported by Grafana. As of Grafana v10.0.0, we do not contribute or accept external contributions to the codebase apart from CVE fixes.
|
||||
|
||||
Legacy alerting refers to the old alerting system that was used prior to the introduction of Grafana Alerting; the new alerting system in Grafana.
|
||||
|
||||
The decision to deprecate legacy alerting was made to encourage users to migrate to the new alerting system, which offers a more powerful and flexible alerting experience based on Prometheus Alertmanager.
|
||||
|
||||
Users who are still using legacy alerting are encouraged to migrate their alerts to the new system as soon as possible to ensure that they continue to receive new features, bug fixes, and support.
|
||||
|
||||
However, we will still patch CVEs until legacy alerting is completely removed in Grafana 11; honoring our commitment to building and distributing secure software.
|
||||
|
||||
We have provided [instructions](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/) on how to migrate to the new alerting system, making the process as easy as possible for users.
|
||||
|
||||
## Why are we deprecating legacy alerting?
|
||||
|
||||
The new Grafana alerting system is more powerful and flexible than the legacy alerting feature.
|
||||
|
||||
The new system is based on Prometheus Alertmanager, which offers a more comprehensive set of features for defining and managing alerts. With the new alerting system, users can create alerts based on complex queries, configure alert notifications via various integrations, and set up sophisticated alerting rules with support for conditional expressions, aggregation, and grouping.
|
||||
|
||||
Overall, the new alerting system in Grafana is a major improvement over the legacy alerting feature, providing users with a more powerful and flexible alerting experience.
|
||||
|
||||
Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it](https://grafana.com/docs/grafana/v9.5/developers/angular_deprecation/) in Grafana 11.
|
||||
|
||||
## When will we remove legacy alerting completely?
|
||||
|
||||
Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation](https://grafana.com/docs/grafana/v9.5/developers/angular_deprecation/).
|
||||
|
||||
## How do I migrate to the new Grafana alerting?
|
||||
|
||||
Refer to our [migration instructions](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/opt-in/).
|
||||
|
||||
### Links
|
||||
|
||||
- [Upgrade Alerting](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/)
|
||||
- [Legacy alerting differences and limitations](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/migrating-legacy-alerts/)
|
||||
- [Angular support deprecation](https://grafana.com/docs/grafana/v9.5/developers/angular_deprecation/)
|
||||
@@ -20,6 +20,8 @@ A mute timing is a recurring interval of time when no new notifications for a po
|
||||
|
||||
Similar to silences, mute timings do not prevent alert rules from being evaluated, nor do they stop alert instances from being shown in the user interface. They only prevent notifications from being created.
|
||||
|
||||
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source]({{< relref "/docs/grafana/latest/datasources/alertmanager" >}}). For more information, refer to [Alertmanager documentation]({{< relref "/docs/grafana/latest/alerting/manage-notifications/alertmanager" >}}).
|
||||
|
||||
## Mute timings vs silences
|
||||
|
||||
The following table highlights the key differences between mute timings and silences.
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/
|
||||
- /docs/grafana-cloud/how-do-i/alerts/
|
||||
- /docs/grafana-cloud/legacy-alerting/
|
||||
description: Legacy alerting
|
||||
title: Legacy alerting
|
||||
weight: 110
|
||||
---
|
||||
|
||||
# Legacy alerting
|
||||
|
||||
**Note:**
|
||||
|
||||
Starting with Grafana v9.0.0, legacy alerting is deprecated. It is no longer actively maintained or supported by Grafana and will be removed in Grafana v11.0.0.
|
||||
|
||||
You have two options to configure alerts within the Grafana Cloud GUI and a third option that enables you to set Grafana Cloud Alerts using the command line.
|
||||
|
||||
- **Grafana alerts** are the same as in an on-prem instance of Grafana.
|
||||
These alerts are created from a graph panel within a Grafana dashboard.
|
||||
This is useful when you want to create a simple alert based on one metric from within a panel.
|
||||
It also has a much simpler learning curve when you are getting started.
|
||||
- **Grafana Cloud alerts - GUI** are an implementation of Prometheus-style rules that enable you to query your Grafana Cloud Metrics and then set up Prometheus Alertmanager-style alerts based on those rules.
|
||||
This is useful when you want to create precise, PromQL-based rules or create alerts from across many metrics and logs being collected into your Grafana Cloud Metrics.
|
||||
This form of alerting is much more powerful and configurable, but that comes with some complexity.
|
||||
- **Grafana Cloud alerts - CLI** use mimirtool to create and upload the same types of Prometheus-style recording and alerting rules definitions to your Grafana Cloud Metrics instance.
|
||||
Once created, you will also be able to view these rules from within the Grafana Cloud Alerting page in the GUI.
|
||||
- **Synthetic Monitoring alerts** are built on Prometheus alerts, just like in Grafana Cloud alerting.
|
||||
You can configure synthetic monitoring alerts separately using the UI in synthetic monitoring.
|
||||
Another option to create alerts for synthetic monitoring checks is to simply use Grafana Cloud alerting.
|
||||
|
||||
## Using Grafana alerts in Grafana Cloud
|
||||
|
||||
Grafana alerts are dashboard panel-driven and can only be created using the Graph panel.
|
||||
This style of alerting builds on top of the query defined for the graph visualization, so alerts and notifications are sent based on breaking some threshold in the associated panel.
|
||||
|
||||
This also means that there is a one-to-one relationship between a Grafana alert and a graph panel.
|
||||
So although Grafana alerts can be viewed centrally, they can only be managed directly from the panel that they’re tied to.
|
||||
As a result, Grafana alerting is best suited for smaller setups, where there are only a few individuals or teams responsible for a small set of dashboards and where there are few dependencies between the dashboards.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Most curated dashboards, such as those provided with an integration or with Synthetic Monitoring do not allow you to alert from panels.
|
||||
This is to preserve the ability to upgrade these dashboards automatically when the integration or Synthetic Monitoring abilities are updated.
|
||||
To create an editable copy that you can edit and alert from, click settings (the gear logo) within any dashboard and then click **Make Editable**.
|
||||
The copy will not be upgraded when/if the curated dashboard receives an update.
|
||||
This is one reason why Grafana Cloud Alerts may be considered a better option.
|
||||
{{% /admonition %}}
|
||||
|
||||
### What makes Grafana alerts unique?
|
||||
|
||||
With Grafana alerts, alerts are limited to only graph panels within dashboards.
|
||||
In addition:
|
||||
|
||||
- Alerts can be edited by both Editor and Admin roles
|
||||
- Alerts are visual, with an associated alerting threshold line
|
||||
- Alerts work with many non-Prometheus data sources, including Graphite
|
||||
- Alert notifications can be routed to many external notifier systems, directly from Grafana
|
||||
- Alerts are directly associated with a dashboard
|
||||
- Alerts can be tested
|
||||
|
||||
## Using Grafana Cloud Alerts
|
||||
|
||||
Because the metrics you collect and send to Grafana Cloud are centrally stored in one large time-series database, Grafana Cloud Metrics, you can query across these metrics using [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) and build alerts directly around those metrics rather than around a panel.
|
||||
You can also query across any logs you have sent using Loki.
|
||||
|
||||
Grafana Cloud Alerts are directly tied to metrics and log data.
|
||||
They can be configured either through the UI or by uploading files containing Prometheus and Loki alert rules with mimirtool.
|
||||
|
||||
Grafana Cloud Alerting's Prometheus-style alerts are built by querying directly from the data source itself.
|
||||
Because these alerts are based on the data, they are not tied to a single panel.
|
||||
This makes it possible to evaluate and centrally manage alerts across several different Prometheus and Loki data source instances.
|
||||
|
||||
### What makes Grafana Cloud Alerts unique?
|
||||
|
||||
With Grafana Cloud Alerts, alerts are not limited to coming from a graph panel.
|
||||
In addition, you can:
|
||||
|
||||
- Prevent alerts from being edited, except by users with accounts that are assigned Admin roles.
|
||||
- Centrally manage and create alerts across many systems, teams, and dashboards.
|
||||
Alerts are not bound to just one system, team, or dashboard.
|
||||
- Create alerts for both metric _and_ log data, based on Prometheus and Loki, respectively.
|
||||
- Silence and mute alerts in bulk, even using a schedule, using the Alertmanager.
|
||||
- Route alert notifications to [many external notifier systems](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) using Alertmanager configurations
|
||||
- Dedupe alert notifications automatically.
|
||||
|
||||
### Grafana Cloud Alert configuration methods
|
||||
|
||||
In a traditional on-prem environment, Prometheus-style alert configuration is done through the combination of defining a [Prometheus configuration file](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) and an [Alertmanager configuration file](https://prometheus.io/docs/alerting/latest/configuration/), which live close to the Prometheus server.
|
||||
With Grafana Cloud, you can still use this setup as well as more flexible architectures.
|
||||
|
||||
- You can use `mimirtool` to upload your configuration files to be hosted and evaluated entirely in Grafana Cloud.
|
||||
- You can manage both alerting rules and Alertmanager configurations directly through the UI.
|
||||
Configuration files are unnecessary with this setup.
|
||||
- You can use both methods concurrently to manage the alerts.
|
||||
For example, updates made using the `mimirtool` are automatically updated and visible within the Grafana Cloud Alerting interface in minutes.
|
||||
@@ -1,200 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/alerts-rules/
|
||||
- /docs/grafana-cloud/how-do-i/alerts/alerts-rules/
|
||||
- /docs/grafana-cloud/legacy-alerting/alerts-rules/
|
||||
- /docs/grafana-cloud/metrics/prometheus/alerts_rules/
|
||||
- /docs/hosted-metrics/prometheus/alerts_rules/
|
||||
description: Prometheus rules with mimirtool
|
||||
title: Prometheus rules with mimirtool
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Prometheus rules with mimirtool
|
||||
|
||||
This page outlines the steps to use mimirtool and Prometheus-style rules with Grafana Cloud Alerting. You can load Prometheus alerting and recording rules that are evaluated entirely in Grafana Cloud. This allows for global rule evaluation over all of the metrics and logs stored in your Grafana Cloud stack.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
`mimirtool` does _not_ support Loki.
|
||||
{{% /admonition %}}
|
||||
|
||||
Prometheus-style alerting is driven by your Grafana Cloud Metrics, Grafana Cloud Logs, and Grafana Cloud Alerts instances. The Metrics and Logs instance holds the rules definition, while the Alerts instance is in charge of routing and managing the alerts that fire from the Metrics and Logs instance. These are separate systems that must be individually configured in order for alerting to work correctly.
|
||||
|
||||
The following sections cover all of these concepts:
|
||||
|
||||
- How to upload alerting and recording rules definition to your Grafana Cloud Metrics instance
|
||||
- How to upload alerting rules definition to your Grafana Cloud Logs instance
|
||||
- How to configure an Alertmanager for your Grafana Cloud Alerts instance, giving you access to the Alertmanager UI.
|
||||
|
||||
**Note:** You need an API key with proper permissions. You can use the same API key for your Metric, Log, and Alerting instances.
|
||||
|
||||
## Download and install mimirtool
|
||||
|
||||
mimirtool is a powerful command-line tool for interacting with Mimir, which powers Grafana Cloud Metrics and Alerts. You'll use mimirtool to upload your metric and log rules definition and the Alertmanager configuration using YAML files.
|
||||
|
||||
For more information, including installation instructions, see [Grafana Mimirtool](/docs/mimir/latest/operators-guide/tools/mimirtool).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
For mimirtool to interact with Grafana Cloud, you must set the correct configuration variables. Set them using either environment variables or a command line flags.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Upload rules definition to your Grafana Cloud Metrics and Logs instance
|
||||
|
||||
First, you'll need to upload your alerting and recording rules to your Metrics and Logs instance. You'll need the instance ID and the URL. These should be part of /orgs/`<yourOrgName>`/.
|
||||
|
||||
### Metrics instance
|
||||
|
||||
Your Metrics instance is likely to be in the `us-central1` region. Its address would be in the form of [https://prometheus-us-central1.grafana.net](https://prometheus-us-central1.grafana.net).
|
||||
|
||||
### Logs instance
|
||||
|
||||
Your Logs instance is likely to be in the `us-central1` region. Its address would be in the form of [https://logs-prod-us-central1.grafana.net](https://logs-prod-us-central1.grafana.net).
|
||||
|
||||
### Using mimirtool
|
||||
|
||||
With your instance ID, URL, and API key you're now ready to upload your rules to your metrics instance. Use the following commands and files as a reference.
|
||||
|
||||
Below is an example alert and rule definition YAML file. Take note of the namespace key which replaces the concept of "files" in this context given each instance only supports 1 configuration file.
|
||||
|
||||
```yaml
|
||||
# first_rules.yml
|
||||
namespace: 'first_rules'
|
||||
groups:
|
||||
- name: 'shopping_service_rules_and_alerts'
|
||||
rules:
|
||||
- alert: 'PromScrapeFailed'
|
||||
annotations:
|
||||
message: 'Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}'
|
||||
expr: 'up != 1'
|
||||
for: '1m'
|
||||
labels:
|
||||
'severity': 'critical'
|
||||
- record: 'job:up:sum'
|
||||
expr: 'sum by(job) (up)'
|
||||
```
|
||||
|
||||
Although both recording and alerting rules are defined under the key `rules` the difference between a rule and and alert is _generally_ (as there are others) whenever the key `record` or `alert` is defined.
|
||||
|
||||
With this file, you can run the following commands to upload your rules file in your Metrics or Logs instance. Keep in mind that these are example commands for your Metrics instance, and they use placeholders and command line flags. Follow a similar pattern for your Logs instances by switching the address to the correct one. The examples also assume that files are located in the same directory.
|
||||
|
||||
```bash
|
||||
$ mimirtool rules load first_rules.yml \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Next, confirm that the rules were uploaded correctly by running:
|
||||
|
||||
```bash
|
||||
$ mimirtool rules list \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Output is a list that shows you all the namespaces and rule groups for your instance ID:
|
||||
|
||||
```bash
|
||||
Namespace | Rule Group
|
||||
first_rules | shopping_service_rules_and_alerts
|
||||
```
|
||||
|
||||
You can also print the rules:
|
||||
|
||||
```bash
|
||||
$ mimirtool rules print \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Output from the print command should look like this:
|
||||
|
||||
```yaml
|
||||
first_rules:
|
||||
- name: shopping_service_rules_and_alerts
|
||||
interval: 0s
|
||||
rules:
|
||||
- alert: PromScrapeFailed
|
||||
expr: up != 1
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
message: Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}
|
||||
- record: job:up:sum
|
||||
expr: sum by(job) (up)
|
||||
```
|
||||
|
||||
## Upload Alertmanager configuration to your Grafana Cloud Alerts instance
|
||||
|
||||
To receive alerts you'll need to upload your Alertmanager configuration to your Grafana Cloud Alerts instance. Similar to the previous step, you'll need the corresponding instance ID, URL and API key. These should be part of /orgs/`<yourOrgName>`/.
|
||||
|
||||
Your Alerts instance is likely to be in the `us-central1` region. Its address would be in the form of [https://alertmanager-us-central1.grafana.net](https://alertmanager-us-central1.grafana.net).
|
||||
|
||||
### Using mimirtool
|
||||
|
||||
With your instance ID, URL, and API key you're now ready to upload your Alertmanager configuration to your Alerts instance. Use the following commands and files as a reference.
|
||||
|
||||
Ultimately, you'll need to [write your own](https://prometheus.io/docs/alerting/latest/configuration/) or adapt an [example config file](https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml) for alerts to be delivered.
|
||||
|
||||
Below is an example Alertmanager configuration. Please take that this not a working configuration, your alerts won't be delivered with the following configuration but your Alertmanager UI will be accessible.
|
||||
|
||||
```yaml
|
||||
# alertmanager.yml
|
||||
global:
|
||||
smtp_smarthost: 'localhost:25'
|
||||
smtp_from: 'youraddress@example.org'
|
||||
route:
|
||||
receiver: example-email
|
||||
receivers:
|
||||
- name: example-email
|
||||
email_configs:
|
||||
- to: 'youraddress@example.org'
|
||||
```
|
||||
|
||||
With this file, you can run the following commands to upload your Alertmanager configuration in your Alerts instance.
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager load alertmanager.yml \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Then, confirm that the rules were uploaded correctly by running:
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager get \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```bash
|
||||
global:
|
||||
smtp_smarthost: 'localhost:25'
|
||||
smtp_from: 'youraddress@example.org'
|
||||
route:
|
||||
receiver: example-email
|
||||
receivers:
|
||||
- name: example-email
|
||||
email_configs:
|
||||
- to: 'youraddress@example.org'
|
||||
```
|
||||
|
||||
Finally, you can delete the configuration with:
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager delete \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
### UI access
|
||||
|
||||
After you upload a working Alertmanager configuration file, you can access the Alertmanager UI at: https://alertmanager-us-central1.grafana.net/alertmanager.
|
||||
@@ -1,76 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/
|
||||
description: Grafana Cloud Alerting
|
||||
title: Grafana Cloud Alerting
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Grafana Cloud Alerting
|
||||
|
||||
Grafana Cloud Alerting allows you to create and manage all of your Prometheus-style alerting rules, for both Prometheus metrics and Loki log data. With this feature, you don't need to leave Grafana, upload or edit configuration files, or install additional tools.
|
||||
|
||||

|
||||
|
||||
## Permissions
|
||||
|
||||
All members of an organization that have alerts set up can view alerts in Grafana Cloud Alerting. This includes everyone with a Viewer, Editor, or Admin role.
|
||||
|
||||
Users with the organization Admin role can also create, edit, or delete alerts.
|
||||
|
||||
## Data sources
|
||||
|
||||
Grafana Cloud Alerting supports rule management across multiple data sources, for both metrics and logs, across all of the stacks in your org. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to configure rules.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Pay attention to which data source you select. Cloud alerts are tied to a specific data source. For example, if you have a Loki data source selected you will not be able to create an alert based on a Prometheus data source.
|
||||

|
||||
{{% /admonition %}}
|
||||
|
||||
## Alerts and recording rules
|
||||
|
||||
Prometheus supports two types of rules:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) - Recording rules allow you to execute expressions or queries, by saving them off as a stored rule instead.
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) - Alerting rules allow you to define alert conditions and to route those notifications to an external service. An alert fires if metrics meet criteria defined in the alerting rule.
|
||||
|
||||
Both of these rules are configurable from the Grafana Cloud Alerting interface and configured in the same way.
|
||||
|
||||
## Alert states
|
||||
|
||||
Alert states are identical to the standard format found in Prometheus rule configurations. In Grafana Cloud Alerting, each individual alert is highlighted by its state to more clearly distinguish between alerts.
|
||||
|
||||
- **Firing -** Alerts that have been active for longer than the configured threshold. Alerts are highlighted in red and tagged with a red `firing` label.
|
||||
- **Pending -** Alerts that have been active for less than the configured threshold. Alerts are highlighted in orange.
|
||||
- **Inactive -** Alerts that are neither firing nor pending. Alerts are highlighted in green.
|
||||
|
||||
## Notifications
|
||||
|
||||
The **Notifications** tab is where you can view all current notifications and sort them by various states, receivers, and labels.
|
||||
|
||||

|
||||
|
||||
## Limits
|
||||
|
||||
There is a limit on how many rules can be created in a rule group. There is also a limit on how many rule groups can be created.
|
||||
|
||||
You can create:
|
||||
|
||||
- 20 rules per rule group
|
||||
- 35 rule groups
|
||||
|
||||
> It is possible to increase these limits. Please contact customer support for further information.
|
||||
|
||||
If you exceed the limits, you will encounter an error similar to this:
|
||||
|
||||
```bash
|
||||
ERROR[0000] requests failed fields.msg="request failed with response body
|
||||
per-user rules per rule group limit (limit: 20 actual: 22) exceeded\n"
|
||||
status="400 Bad Request"
|
||||
ERROR[0000] unable to load rule group error="failed request to the cortex api"
|
||||
group=limit_rules_per_group namespace=test
|
||||
```
|
||||
|
||||
To increase the number of rules or rule groups you can configure, contact support to upgrade your account.
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/alertmanager/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/alertmanager/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/alertmanager/
|
||||
description: Alertmanager
|
||||
title: Alertmanager
|
||||
weight: 500
|
||||
---
|
||||
|
||||
# Alertmanager
|
||||
|
||||
Grafana Cloud Alerting allows you to edit and view configuration for your Alertmanager directly inside of Grafana. See the official [Alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/) to learn how to configure.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Only organization Admins can view or update Alertmanger configurations.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Edit a config for Grafana Cloud Alerting
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
|
||||
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
|
||||
1. Currently active configuration for the Alertmanager will be displayed. Click the **Edit** button to enter edit mode and start making changes. Click "Save and finish editing" once done to persist your changes.
|
||||
1. Alternatively, updates to the Alertmanager configurations made using the mimirtool will also sync and appear here.
|
||||
|
||||
## Use the Grafana Labs-supplied SMTP option to configure email notifications
|
||||
|
||||
Grafana Cloud users who do not have an SMTP server available for sending alert emails may use Grafana-Labs supplied SMTP relay (available at `smtprelay:2525`).
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
|
||||
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
|
||||
1. Find info box with heading **Send alert email notifications from Grafana Cloud** at the top
|
||||
1. Enter desired email address into the **email address** field
|
||||
1. Click **Update configuration** button. Alertmanager config will be updated with grafana SMTP relay settings and an "email" receiver that will send to the specified email address.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Following these steps will overwrite any custom global SMTP settings that you might have. Default route configuration will send all notifications to the "email" receiver. If you have already customized routes, they will not be updated and you will have to configure "email" receiver on the appropriate route.
|
||||
{{% /admonition %}}
|
||||
|
||||
Use these settings in your Grafana Cloud Alerting YAML, if you do not find them already set. Most important is the `smtp_require_tls: false` line. If this is not set properly, alert emails will not be received. If you use mimirtool to configure alertmanager, by default this will be set to `true`, which will cause problems.
|
||||
|
||||
```yaml
|
||||
global:
|
||||
smtp_from: noreply@grafana.net
|
||||
smtp_smarthost: smtprelay:2525
|
||||
smtp_require_tls: false
|
||||
```
|
||||
|
||||
## Troubleshooting Alertmanager failures
|
||||
|
||||
Configuration errors can cause Alertmanager notification failures, e.g. a typo in an email address recipient or an expired token for a webhook. Grafana Cloud provisions a Loki datasource `grafanacloud-<stack_slug>-usage-insights` which can be used to display select notification errors with a query similar to the example below. The `instance_type` label of `alerts` is what selects the Grafana Cloud Alertmanager logs.
|
||||
|
||||
```sql
|
||||
{instance_type="alerts"} | logfmt | level="warn"
|
||||
```
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/create-edit-rules/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/create-edit-rules/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/create-edit-rules/
|
||||
description: Create and edit alert rules
|
||||
title: Create and edit alert rules
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Create and edit alert rules
|
||||
|
||||
Creating alerts in Grafana Cloud differs from creating alerts directly with Prometheus or Loki. While the rule format is the same, everything is done in the Grafana Cloud Alerting interface, rather than with configuration files.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Only organization Admins can create or edit alert rules.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Create an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Click **Add rule**.
|
||||
|
||||
Grafana creates a new rule with placeholders.
|
||||
|
||||
```
|
||||
alert: ""
|
||||
expr: ""
|
||||
```
|
||||
|
||||
Enter text according to regular Prometheus rule configuration guidelines:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Cloud Alerting does not support comments.
|
||||
{{% /admonition %}}
|
||||
|
||||
When you are finished, click **Save**. You can then repeat the process to create more rules or click **Finish editing** to return to the rules list.
|
||||
|
||||
## Edit an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Scroll down to the rule that you want to edit and then click **Edit**.
|
||||
1. Make any necessary changes to the rule text and then click **Save**.
|
||||
1. Click **Finish editing** to return to the rules list.
|
||||
|
||||
## Delete an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Scroll down to the rule that you want to edit and then click **Delete**.
|
||||
1. Click **Finish editing** to return to the rules list.
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/namespaces-and-groups/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/namespaces-and-groups/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/namespaces-and-groups/
|
||||
description: Namespaces and rule groups
|
||||
title: Namespaces and rule groups
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Namespaces and rule groups
|
||||
|
||||
By default, all alerting and recording rules created in Grafana Cloud Alerting will default to a single namespace and a single rule group.
|
||||
|
||||
## Managing namespaces
|
||||
|
||||
While Grafana Cloud Alerting does support viewing multiple namespaces that have been added through the mimirtool, it is currently not possible to add new namespaces or to rename the existing ones.
|
||||
|
||||
## Managing rule groups
|
||||
|
||||
Rule groups can be managed directly within the Grafana Cloud Alerting interface or through the mimirtool, similar to managing namespaces.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
By default, Grafana Cloud limits the number of rule groups to 20, with a limit of up to 15 rules per group. If you wish to increase the default limits, please [open a support ticket](/profile/org#support) or reach out to your account manager.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Create a new rule group:
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
2. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
3. Click **Create new rule group**.
|
||||
4. Enter text to name your new rule group.
|
||||
5. Enter text for the new rule in your new rule group, according to regular Prometheus rule configuration guidelines:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
|
||||
|
||||
6. When you are finished naming your new rule group and adding new rule details, click **Save**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
In order to create a new rule group, you must also create a new rule for it.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Update a rule group
|
||||
|
||||
Existing rule groups can be renamed by selecting the **pencil** icon next to the rule group name.
|
||||
|
||||
### Delete a rule group
|
||||
|
||||
Rule groups will be automatically deleted once the all rules within a group are deleted.
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/silences/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/silences/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/silences/
|
||||
description: Silences
|
||||
title: Silences
|
||||
weight: 600
|
||||
---
|
||||
|
||||
# Silences
|
||||
|
||||
Grafana Cloud Alerting allows you to manage silences for your alertmanager notifications directly inside of Grafana. This applies to alerting rules created for both Prometheus metrics and Loki logs.
|
||||
|
||||
## Create a silence
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Silences**.
|
||||
2. Click **New silence**.
|
||||
3. Enter a date in **Start of silence** to indicate when the silence should go into effect.
|
||||
4. Enter a date in **End of silence** to indicate when the silence should expire.
|
||||
5. Enter one or more matchers by filling out the **Name** and **Value** fields. Matchers determine which rules the silence will apply to.
|
||||
6. Enter the name of the owner in **Creator**.
|
||||
7. Enter a **Comment**.
|
||||
8. To view which rules will be affected by your silence, click **Preview alerts**.
|
||||
9. Otherwise, when you are finished, click **Create**
|
||||
|
||||
## Update an existing silence
|
||||
|
||||
You can always update an existing silence by clicking the **Edit silence** button under the silence.
|
||||
|
||||
It is also possible to expire a silence, on-demand, by clicking the **Expire silence** button under the silence. This will override the original scheduled expiration date of the silence.
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/view-filter-rules/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/view-filter-alerts/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/view-filter-rules/
|
||||
description: View and filter alert rules
|
||||
title: View and filter alert rules
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# View and filter alert rules
|
||||
|
||||
Grafana Cloud Alerting displays a list of all recording and alerting rules assigned to a selected data source in the Alerts and rules tab.
|
||||
|
||||
All members of an organization that have access to a particular data source can view the list of rules and filter or reorder their view.
|
||||
|
||||
## View alert rules
|
||||
|
||||
1. Hover your cursor over the **Grafana Cloud Alerting** icon (alarm bell with Prometheus logo) and then click **Alerts and rules**.
|
||||
1. In the list at the top of the tab, select the data source for which you want to view rules.
|
||||
|
||||
Grafana displays rules according to rule groups. If your instance has added namespaces and alert groups, then they will be ordered alphabetically. Otherwise, you will have one namespace called `default` and an alert group called `rules`.
|
||||
|
||||
If an alert is firing, then click the down carrot arrow to see additional information. The Label and annotations section appears.
|
||||
|
||||
## Filter your alert rule view
|
||||
|
||||
You can control which alerts you see and in what order they appear several ways. Combine different filters to personalize your view so that you can quickly find the information that you need.
|
||||
|
||||
- **Filter by alert state -** Click the toggles to show or hide alerts in different states. Turn off the toggle to hide alerts matching the state.
|
||||
- **Filter by rule type -** Click the toggles to show or hide alerting rules or recording rules.
|
||||
- **View options -** Click the toggle to show or hide the Prometheus annotations shown in the Labels and annotations section.
|
||||
- **Rule sorting -** Click an option to sort alert rules within each rule group.
|
||||
- **None -** No special sort is applied and sorts as if in a file, ordered according to the editing list order.
|
||||
- **A-Z -** Sorts rules alphabetically according to the rule name.
|
||||
- **Alert state -** Sorts rules according to the alert state (Firing, Pending, or Inactive).
|
||||
|
||||
## View alert in Explore
|
||||
|
||||
Click **View in Explore** or click the `expr` link to open the `expr` in [Explore](/docs/grafana/latest/explore/).
|
||||
|
||||
> **Note:** Only users with Admin or Editor roles in an organization can use the Explore feature unless the viewers can edit.
|
||||
@@ -20,24 +20,18 @@ longer supported. We refer to these as [Differences]({{< relref "#differences" >
|
||||
|
||||
2. Read and write access to legacy dashboard alerts and Grafana alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
|
||||
|
||||
- If there are dashboard permissions, a folder named `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` is created to match the permissions of the dashboard (including the inherited permissions from the folder).
|
||||
- If there are no dashboard permissions and the dashboard is in a folder, then the rule is linked to this folder and inherits its permissions.
|
||||
- If there are no dashboard permissions and the dashboard is in the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
|
||||
- If alert's dashboard has permissions, it will create a folder named like `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` to match permissions of the dashboard (including the inherited permissions from the folder).
|
||||
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
|
||||
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder, and the rule inherits the default permissions.
|
||||
|
||||
3. `NoData` and `Error` settings are migrated as is to the corresponding settings in Grafana Alerting, except in two situations:
|
||||
|
||||
3.1. As there is no `Keep Last State` option for `No Data` in Grafana Alerting, this option becomes `NoData`. The `Keep Last State` option for `Error` is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
|
||||
|
||||
3.2. Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for `NoData` and [`Error`](/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md#configure-no-data-and-error-handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error.
|
||||
3. Since there is no `Keep Last State` option for [`No Data`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana Alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
|
||||
|
||||
4. Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
|
||||
|
||||
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications]({{< relref "../manage-notifications/images-in-notifications" >}}).
|
||||
|
||||
6. The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
|
||||
|
||||
7. Alerting on Prometheus `Both` type queries is not supported in Grafana Alerting. Existing legacy alerts with `Both` type queries are migrated to Grafana Alerting as alerts with `Range` type queries.
|
||||
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/images-in-notifications/).
|
||||
6. Grafana Alerting does not support pausing the evaluation of alert rules. After migration, all paused alert rules will become active, which may cause unexpected notifications to be sent.
|
||||
|
||||
## Limitations
|
||||
|
||||
1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
|
||||
Silences (expiring after one year) are created for all paused dashboard alerts.
|
||||
|
||||
@@ -47,4 +47,4 @@ Grafana cannot be used to receive external alerts. You can only send alerts to t
|
||||
|
||||
You have the option to send Grafana managed alerts to an external Alertmanager, you can find this option in the admin tab on the Alerting page.
|
||||
|
||||
For more information, refer to [this GitHub discussion](https://github.com/grafana/grafana/discussions/45773).
|
||||
For more information, refer to [this GitHub discussion](https://github.com/grafana/grafana/discussions/45773). For more information on the different Alertmanagers, refer to [Alertmanager]([{{< relref "../manage-notifications/alertmanager/" >}}](https://grafana.com/docs/grafana/next/alerting/manage-notifications/alertmanager/).
|
||||
|
||||
@@ -11,4 +11,4 @@ Configure the features and integrations that you need to create and manage your
|
||||
|
||||
- [Configure Alertmanager](https://grafana.com/docs/grafana/latest/alerting/set-up/configure-alertmanager/)
|
||||
- [Provision Grafana Alerting resources](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/)
|
||||
- [Connect Grafana Alerting to Grafana OnCall](https://grafana.com/docs/oncall/latest/integrations/grafana-alerting/)
|
||||
- [Connect Grafana Alerting to Grafana OnCall](https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-grafana-alerting/)
|
||||
|
||||
@@ -28,7 +28,7 @@ Since gossiping of notifications and silences uses both TCP and UDP port `9094`,
|
||||
|
||||
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the `[unified_alerting]` section.
|
||||
2. Set `[ha_peers]` to the number of hosts for each Grafana instance in the cluster (using a format of host:port), for example, `ha_peers=10.0.0.5:9094,10.0.0.6:9094,10.0.0.7:9094`.
|
||||
You must have at least one (1) Grafana instance added to the `ha_peers` section.
|
||||
You must have at least one (1) Grafana instance added to the [`[ha_peer]` section.
|
||||
3. Set `[ha_listen_address]` to the instance IP address using a format of `host:port` (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes).
|
||||
By default, it is set to listen to all interfaces (`0.0.0.0`).
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ groups:
|
||||
# <string, required> which query should be used for the condition
|
||||
condition: A
|
||||
# <list, required> list of query objects that should be executed on each
|
||||
# evaluation - should be obtained through the API
|
||||
# evaluation - should be obtained trough the API
|
||||
data:
|
||||
- refId: A
|
||||
datasourceUid: '__expr__'
|
||||
|
||||
@@ -110,7 +110,7 @@ You cannot edit resources provisioned via Terraform from the UI. This ensures th
|
||||
|
||||
**Note:**
|
||||
|
||||
You can reuse the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
|
||||
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
|
||||
|
||||
This fragment can then be managed separately in Terraform:
|
||||
|
||||
|
||||
7
docs/sources/copyright/_index.md
Normal file
7
docs/sources/copyright/_index.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Copyright notice
|
||||
---
|
||||
|
||||
# Copyright notice
|
||||
|
||||
Copyright © 2021 Raintank, Inc. dba Grafana Labs. All Rights Reserved.
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
aliases:
|
||||
- features/dashboard/dashboards/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Dashboards
|
||||
weight: 70
|
||||
---
|
||||
|
||||
@@ -83,23 +83,10 @@ To change _recent_ to something other than the past 10 minutes, edit the [config
|
||||
|
||||
```ini
|
||||
[analytics.views]
|
||||
|
||||
# Set age for recent active users to 10 minutes
|
||||
# Set age for recent active users
|
||||
recent_users_age = 10m
|
||||
```
|
||||
|
||||
To disable the presence indicator, edit the [configuration][] file as follows:
|
||||
|
||||
```ini
|
||||
[analytics.views]
|
||||
|
||||
|
||||
# Disables the presence indicator
|
||||
recent_users_age = 0
|
||||
```
|
||||
|
||||
The dashboard won't show any avatars and thus no recent user activity.
|
||||
|
||||
## Sort dashboards by using insights data
|
||||
|
||||
In the search view, you can use insights data to help you find most-used, broken, and unused dashboards.
|
||||
|
||||
@@ -14,124 +14,85 @@ weight: 600
|
||||
|
||||
# Annotate visualizations
|
||||
|
||||
Annotations provide a way to mark points on a visualization with rich events. They are visualized as vertical lines and icons on all graph panels. When you hover over an annotation, you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
|
||||
{{< figure src="/static/img/docs/v46/annotations.png" max-width="800px" >}}
|
||||
|
||||
You can annotate visualizations in three ways:
|
||||
## Native annotations
|
||||
|
||||
- Directly in the panel, using the [built-in annotations query](#built-in-query)
|
||||
- Using the HTTP API
|
||||
- Configuring annotation queries in the dashboard settings
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
|
||||
In the first two cases, you're creating new annotations, while in the last you're querying existing annotations from data sources. The built-in annotation query also supports this.
|
||||
### Add annotation
|
||||
|
||||
This page explains the first and third options; for information about using the HTTP API, refer to [Annotations API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
|
||||
Annotations are supported for the following visualization types:
|
||||
|
||||
- Time series
|
||||
- State timeline
|
||||
- Candlestick
|
||||
|
||||
## Create annotations in panels
|
||||
|
||||
Grafana comes with the ability to add annotation events directly from a panel using the [built-in annotation query](#built-in-query) that exists on all dashboards. Annotations that you create this way are stored in Grafana.
|
||||
|
||||
To add annotations directly in the panel, the built-in query must be enabled. Learn more in [Built-in query](#built-in-query)
|
||||
|
||||
### Add an annotation
|
||||
|
||||
To add an annotation, complete the following steps:
|
||||
|
||||
1. In the dashboard click the panel to which you're adding the annotation. A context menu will appear.
|
||||
1. In the context menu, click **Add annotation**.
|
||||
1. In the dashboard click on the Time series panel. A context menu will appear.
|
||||
1. In the context menu click on **Add annotation**.
|
||||

|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save**.
|
||||
1. Add an annotation description and tags(optional).
|
||||

|
||||
1. Click save.
|
||||
|
||||
Alternatively, to add an annotation, press Ctrl/Cmd and click the panel, and the **Add annotation** popover will appear.
|
||||
Alternatively, to add an annotation, Ctrl/Cmd+Click on the Time series panel and the Add annotation popover will appear
|
||||
|
||||
### Add a region annotation
|
||||
### Add region annotation
|
||||
|
||||
1. In the dashboard press Ctrl/Cmd and click and drag on the panel.
|
||||
1. In the dashboard Ctrl/Cmd+click and drag on the Time series panel.
|
||||

|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save**.
|
||||
1. Add an annotation description and tags(optional).
|
||||
1. Click save.
|
||||
|
||||
### Edit an annotation
|
||||
### Edit annotation
|
||||
|
||||
1. In the dashboard, hover over an annotation indicator on the Time series panel.
|
||||
1. In the dashboard hover over an annotation indicator on the Time series panel.
|
||||
<!---->
|
||||
1. Click on the pencil icon in the annotation tooltip.
|
||||
1. Modify the description and/or tags.
|
||||
1. Click save.
|
||||
|
||||
### Delete an annotation
|
||||
### Delete annotation
|
||||
|
||||
1. In the dashboard hover over an annotation indicator on a panel.
|
||||
1. In the dashboard hover over an annotation indicator on the Time series panel.
|
||||
<!---->
|
||||
1. Click on the trash icon in the annotation tooltip.
|
||||
|
||||
## Fetch annotations through dashboard settings
|
||||
### Built-in query
|
||||
|
||||
In the dashboard settings, under **Annotations**, you can add new queries to fetch annotations using any data source, including the built-in data annotation data source. Annotation queries return events that can be visualized as event markers in graphs across the dashboard.
|
||||
After you added an annotation they will still be visible. This is due to the built in annotation query that exists on all dashboards. This annotation query will
|
||||
fetch all annotation events that originate from the current dashboard and show them on the panel where they were created. This includes alert state history annotations. You can
|
||||
stop annotations from being fetched and drawn by opening the **Annotations** settings (via Dashboard cogs menu) and modifying the query named `Annotations & Alerts (Built-in)`.
|
||||
|
||||
### Add new annotation queries
|
||||
When you copy a dashboard using the **Save As** feature it will get a new dashboard id so annotations created on source dashboard will no longer be visible on the copy. You
|
||||
can still show them if you add a new **Annotation Query** and filter by tags. But this only works if the annotations on the source dashboard had tags to filter by.
|
||||
|
||||
To add a new annotation query to a dashboard, take the following steps:
|
||||
### Query by tag
|
||||
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
|
||||
1. Select **Annotations**.
|
||||
1. Click **Add annotation query**.
|
||||
|
||||
If you've added a query before, the **+ New query** button is displayed.
|
||||
|
||||
1. Enter a name for the annotation query.
|
||||
|
||||
This name is given to the toggle (checkbox) that will allow you to enable/disable showing annotation events from this query.
|
||||
|
||||
1. Select the data source for the annotations.
|
||||
1. If you don't want to use the annotation query right away, clear the **Enabled** checkbox.
|
||||
1. If you don't want the annotation query toggle to be displayed in the dashboard, select the **Hidden** checkbox.
|
||||
1. Select a color for the event markers.
|
||||
1. Configure the query.
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
|
||||
## Built-in query
|
||||
|
||||
After you add an annotation, they will still be visible. This is due to the built-in annotation query that exists on all dashboards. This annotation query will fetch all annotation events that originate from the current dashboard, which are stored in Grafana, and show them on the panel where they were created. This includes alert state history annotations.
|
||||
|
||||
To add annotations directly to the dashboard, this query must be enabled.
|
||||
|
||||
To confirm if the built-in query is enabled, take the following steps:
|
||||
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the dashboard settings menu.
|
||||
1. Click **Annotations**.
|
||||
1. Find the **Annotations & Alerts (Built-in)** query.
|
||||
|
||||
If it says **Disabled** before the name of the query, then you'll need to click the query name to open it and update the setting.
|
||||
|
||||
You can stop annotations from being fetched and drawn by taking the following steps:
|
||||
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
|
||||
1. Click **Annotations**.
|
||||
1. Find and click the **Annotations & Alerts (Built-in)** query to open it.
|
||||
1. Click the **Enabled** toggle to turn it off.
|
||||
|
||||
When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on the source dashboard will no longer be visible on the copy. You can still show them if you add a new **Annotation Query** and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by.
|
||||
|
||||
### Filter queries by tag
|
||||
|
||||
You can create new queries to fetch annotations from the built-in annotation query using the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
|
||||
You can create new queries to fetch annotations from the native annotation store via the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
|
||||
|
||||
Grafana v8.1 and later versions also support typeahead of existing tags, provide at least one tag.
|
||||
|
||||
For example, create an annotation query name `outages` and specify a tag `outage`. This query will show all annotations (from any dashboard or via API) with the `outage` tag. If multiple tags are defined in an annotation query, then Grafana will only show annotations matching all the tags. To modify the behavior, enable `Match any`, and Grafana will show annotations that contain any one of the tags you provided.
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-annotations-typeahead-support-10.0.png" max-width="600px" >}}
|
||||
{{< figure src="/static/img/docs/annotations/annotations_typeahead_support-8-1-0.png" max-width="600px" >}}
|
||||
|
||||
You can also use template variables in the tag query. This means if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can use the same template variable in your annotation query to only show annotations for those services.
|
||||
In Grafana v5.3+ it's possible to use template variables in the tag query. So if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can now use the same template variable in your annotation query to only show annotations for those services.
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-annotation-tag-filter-variable-10.0.png" max-width="600px" >}}
|
||||
{{< figure src="/static/img/docs/annotations/annotation_tag_filter_variable-8-1-0.png" max-width="600px" >}}
|
||||
|
||||
## Querying other data sources
|
||||
|
||||
Annotation events are fetched via annotation queries. To add a new annotation query to a dashboard
|
||||
open the dashboard settings menu, then select `Annotations`. This will open the dashboard annotations
|
||||
settings view. To create a new annotation query hit the `New` button.
|
||||
|
||||
<!---->
|
||||
|
||||
{{< figure src="/static/img/docs/v50/annotation_new_query.png" max-width="600px" >}}
|
||||
|
||||
Specify a name for the annotation query. This name is given to the toggle (checkbox) that will allow
|
||||
you to enable/disable showing annotation events from this query. For example you might have two
|
||||
annotation queries named `Deploys` and `Outages`. The toggle will allow you to decide what annotations
|
||||
to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
|
||||
@@ -65,7 +65,7 @@ The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured
|
||||
|
||||
### Example
|
||||
|
||||
[This example in Grafana Play](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica) passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
See [https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica] - this passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
|
||||
@@ -26,18 +26,11 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **New Dashboard**.
|
||||
1. On the empty dashboard, click **+ Add visualization**.
|
||||
|
||||

|
||||
|
||||
1. In the first line of the **Query** tab, click the dropdown list and select a data source.
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
|
||||
|
||||
1. Click the Refresh dashboard icon to query the data source.
|
||||
|
||||

|
||||
|
||||
1. In the visualization list, select a visualization type.
|
||||
|
||||

|
||||
@@ -56,15 +49,9 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
- [Configure thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels-visualizations/configure-standard-options/" >}})
|
||||
|
||||
1. When you've finished editing your panel, click **Save** to save the dashboard.
|
||||
|
||||
Alternatively, click **Apply** if you want to see your changes applied to the dashboard first. Then click the save icon in the dashboard header.
|
||||
|
||||
1. When you've finished editing your panel, click **Save** in the top right corner.
|
||||
1. Enter a name for your dashboard and select a folder, if applicable.
|
||||
1. Click **Save**.
|
||||
1. To add more panels to the dashboard, click **Add** in the dashboard header and select **Visualization** in the dropdown.
|
||||
|
||||

|
||||
|
||||
## Configure repeating rows
|
||||
|
||||
|
||||
@@ -10,10 +10,6 @@ keywords:
|
||||
- reporting
|
||||
- export
|
||||
- pdf
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
menuTitle: Reporting
|
||||
title: Create and manage reports
|
||||
weight: 85
|
||||
@@ -30,7 +26,7 @@ Reporting enables you to automatically generate PDFs from any of your dashboards
|
||||
{{< figure src="/static/img/docs/enterprise/reports_list_8.1.png" max-width="500px" >}}
|
||||
-->
|
||||
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes, unless you've configured a custom time range.
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
|
||||
|
||||
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
|
||||
|
||||
@@ -73,14 +69,6 @@ Only organization administrators can create reports by default. You can customiz
|
||||
- **Send test email:** To verify that the configuration works as expected. You can choose to send this email to the recipients configured for the report, or to a different set of email addresses only used for testing.
|
||||
1. Preview and save the report.
|
||||
|
||||
### Save as draft
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 9.1.0 and later and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can save a report as a draft at any point during the report creation or update process. You can save a report as a draft even if it's missing required fields. Also, the report won't be sent according to its schedule while it's a draft.
|
||||
|
||||
### Choose template variables
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.5 and later behind the `reportVariables` feature flag, Grafana Enterprise version 8.0 and later without a feature flag, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
@@ -8,13 +8,9 @@ weight: 8
|
||||
|
||||
# Public dashboards
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
> **Note:** This is an opt-in alpha feature.
|
||||
|
||||
This feature is experimental.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
> **Caution:** Making your dashboard public could result in a large number of queries to the data sources used by your dashboard.
|
||||
> **Caution:** Making your dashboard public could result in a large number of queries to the datasources used by your dashboard.
|
||||
> This can be mitigated by utilizing the enterprise [caching](https://grafana.com/docs/grafana/latest/enterprise/query-caching/) and/or rate limiting features.
|
||||
|
||||
Public dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to expose your
|
||||
@@ -24,7 +20,7 @@ dashboard to the world.
|
||||
|
||||
- Anyone with the URL can access the dashboard.
|
||||
- Public dashboards are read-only.
|
||||
- Arbitrary queries **cannot** be run against your data sources through public dashboards. Public dashboards can only execute the
|
||||
- Arbitrary queries **cannot** be run against your datasources through public dashboards. Public dashboards can only execute the
|
||||
queries stored on the original dashboard.
|
||||
|
||||
## Enable the feature
|
||||
@@ -70,16 +66,21 @@ The link no longer works. You must create a new public URL as in [Make a dashboa
|
||||
|
||||
## Email sharing
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
This feature is experimental in [Grafana Cloud Pro and Advanced](/docs/grafana-cloud). The feature will have a cost by active users after being promoted into general availability.
|
||||
|
||||
Please contact support to have the feature enabled.
|
||||
|
||||
{{% /admonition %}}
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud).
|
||||
|
||||
Email sharing allows you to share your public dashboard with only specific people via email, instead of having it accessible to anyone with the URL.
|
||||
|
||||
### Enable email sharing
|
||||
|
||||
> **Note:** For Grafana Cloud, contact support to have the feature enabled.
|
||||
|
||||
Add the `publicDashboardsEmailSharing` feature toggle to your `custom.ini` file.
|
||||
|
||||
```
|
||||
[feature_toggles]
|
||||
publicDashboardsEmailSharing = true
|
||||
```
|
||||
|
||||
### Invite a viewer
|
||||
|
||||
1. Click the sharing icon to the right of the dashboard title.
|
||||
@@ -157,7 +158,7 @@ guaranteed because plugin developers can override this functionality. The follow
|
||||
|
||||
### Unconfirmed:
|
||||
|
||||
> **Note:** If you've confirmed one of these data sources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
|
||||
> **Note:** If you've confirmed one of these datasources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -219,14 +220,14 @@ guaranteed because plugin developers can override this functionality. The follow
|
||||
|
||||
## Limitations
|
||||
|
||||
- Panels that use frontend data sources will fail to fetch data.
|
||||
- Panels that use frontend datasources will fail to fetch data.
|
||||
- Template variables are currently not supported, but are planned to be in the future.
|
||||
- Exemplars will be omitted from the panel.
|
||||
- Only annotations that query the `-- Grafana --` data source are supported.
|
||||
- Only annotations that query the `-- Grafana --` datasource are supported.
|
||||
- Organization annotations are not supported.
|
||||
- Grafana Live and real-time event streams are not supported.
|
||||
- Library panels are currently not supported, but are planned to be in the future.
|
||||
- Data sources using Reverse Proxy functionality are not supported.
|
||||
- Datasources using Reverse Proxy functionality are not supported.
|
||||
|
||||
We are excited to share this enhancement with you and we’d love your feedback! Please check out the [Github](https://github.com/grafana/grafana/discussions/49253) discussion and join the conversation.
|
||||
|
||||
|
||||
@@ -53,8 +53,6 @@ Folders help you organize and group dashboards, which is useful when you have ma
|
||||
1. On the Dashboards page, click **New** and select **New folder** in the dropdown.
|
||||
1. Enter a unique name and click **Create**.
|
||||
|
||||
Do not use the name of a folder that has already been provisioned (such as "General") and avoid special characters (except underscores and hyphens).
|
||||
|
||||
When you save a dashboard, you can either select a folder for the dashboard to be saved in or create a new folder.
|
||||
|
||||
## Manage dashboards
|
||||
|
||||
@@ -25,13 +25,13 @@ This topic provides an overview of dashboard features and shortcuts, and describ
|
||||
|
||||
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
|
||||
|
||||
The following image and descriptions highlight all dashboard features.
|
||||
The following image and descriptions highlights all dashboards features.
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-annotated-9-5-0.png" width="700px" >}}
|
||||
|
||||
- (1) **Grafana home**: Click **Home** in the breadcrumb to be redirected to the home page configured in the Grafana instance.
|
||||
- (2) **Dashboard title**: When you click the dashboard title, you can search for dashboards contained in the current folder.
|
||||
- (3) **Share dashboard or panel**: Use this option to share the current dashboard or panel using a link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- (2) **Dashboard title**: When you click the dashboard title you can search for dashboard contained in the current folder.
|
||||
- (3) **Share dashboard or panel**: Use this option to share the current dashboard or panel by link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- (4) **Add**: Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- (5) **Save dashboard**: Click to save changes to your dashboard.
|
||||
- (6) **Dashboard insights**: Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics]({{< relref "../assess-dashboard-usage/" >}}).
|
||||
@@ -86,7 +86,7 @@ This section describes supported time units and relative ranges, the common time
|
||||
|
||||
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
|
||||
|
||||
The minus operator enables you to step back in time, relative to the current date and time, or `now`. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
|
||||
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
|
||||
|
||||
@@ -105,15 +105,13 @@ The following table provides example relative ranges:
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
#### Note about Grafana Alerting
|
||||
|
||||
Grafana Alerting does not support the following syntaxes at this time:
|
||||
For Grafana Alerting, we do not support the following syntaxes at this time.
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
### Common time range controls
|
||||
|
||||
The dashboard and panel time controls have a common UI.
|
||||
@@ -158,32 +156,6 @@ You can set an absolute time range in the following ways:
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
#### Semi-relative time range
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
Grafana Alerting does not support semi-relative time ranges.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also use the absolute time range settings to set a semi-relative time range. Semi-relative time range dashboards are useful when you need to monitor the progress of something over time, but you also want to see the entire history from a starting point.
|
||||
|
||||
Set a semi-relative time range by setting the start time to an absolute timestamp and the end time to a “now” that is relative to the current time. For example:
|
||||
|
||||
**Start time:** `2023-05-01 00:00:00`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
If you wanted to track the progress of something during business hours, you could set a time range that covers the current day, but starting at 8am, like so:
|
||||
|
||||
**Start time:** `now/d+8h`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
This is equivalent to the **Today so far** time range preset, but it starts at 8:00am instead of 12:00am by appending +8h to the periodic start time.
|
||||
|
||||
Using a semi-relative time range, as time progresses, your dashboard will automatically and progressively zoom out to show more history and fewer details. At the same rate, as high data resolution decreases, historical trends over the entire time period will become more clear.
|
||||
|
||||
#### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
||||
@@ -45,19 +45,20 @@ To see variable settings, navigate to **Dashboard Settings > Variables**. Click
|
||||
|
||||
Variables can be used in titles, descriptions, text panels, and queries. Queries with text that starts with `$` are templates. Not all panels will have template queries.
|
||||
|
||||
The following dashboards in Grafana Play provide examples of template variables:
|
||||
The following dashboards in Grafana Play provide examples of template variables.
|
||||
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/templated-dynamic-dashboard?orgId=1&var-app=backend&var-server=backend_01&var-server=backend_02&var-server=backend_03&var-server=backend_04&var-interval=1h) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
|
||||
- [Global variables and interpolation](https://play.grafana.org/d/HYaGDGIMk/templating-global-variables-and-interpolation?orgId=1&var-Server=A%27A%22A&var-Server=BB%5CB)
|
||||
- [Elasticsearch Dummy Flight Data](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1&var-Filters=Carrier%7C%3D%7CLogstash%20Airways&var-query0=) - Uses ad hoc filters.
|
||||
- [Elasticsearch Metrics](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1) - Uses ad hoc filters, global variables, and a custom variable.
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
|
||||
- [Influx DB Group By Variable](https://play.grafana.org/d/000000137/influxdb-group-by-variable?orgId=1) - Query variable, panel uses the variable results to group the metric data.
|
||||
- [InfluxDB Raw Query Template Var](https://play.grafana.org/d/000000083/influxdb-raw-query-template-var?orgId=1) - Uses query variables, chained query variables, and an interval variable.
|
||||
- [InfluxDB Server Monitoring](https://play.grafana.org/d/AAy9r_bmk/influxdb-server-monitoring?orgId=1) - Uses query variables, chained query variables, an interval variable, and an ad hoc filter.
|
||||
- [Prometheus templating](https://play.grafana.org/d/000000063/prometheus-templating?orgId=1) - Uses chained query variables.
|
||||
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, ad hoc filters, an interval variable, a text box variable, a custom variable, and a data source variable.
|
||||
- [Templating, repeated panels](https://play.grafana.org/d/000000025/templating-repeated-panels?orgId=1) - Two sets of repeated panels use query variables.
|
||||
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, an interval variable, a text box variable, a custom variable, and a data source variable.
|
||||
- [Nested Variables Drilldown](https://play.grafana.org/d/testdata-nested-variables-drilldown/templating-nested-variables-drilldown?orgId=1&var-datacenter=A&var-server=AA&var-server=AC&var-pod=All)
|
||||
- [Templating showcase](https://play.grafana.org/d/000000091/templating-showcase?orgId=1) - Uses custom, query, chained query, and data source variables.
|
||||
- [Templating value groups](https://play.grafana.org/d/000000024/templating-value-groups?orgId=1) - Uses query variable with value groups.
|
||||
|
||||
## Variable best practices
|
||||
|
||||
- Variable drop-down lists are displayed in the order they are listed in the variable list in Dashboard settings.
|
||||
- Put the variables that you will change often at the top, so they will be shown first (far left on the dashboard).
|
||||
- By default, variables don't have a default value. This means that the topmost value in the drop-down is always preselected. If you want to pre-populate a variable with an empty value, you can use the following workaround in the variable settings:
|
||||
1. Select the **Include All Option** checkbox.
|
||||
2. In the **Custom all value** field, enter a value like `+`.
|
||||
|
||||
@@ -61,7 +61,7 @@ The following table lists the types of variables shipped with Grafana.
|
||||
You must enter general options for any type of variable that you create.
|
||||
|
||||
1. Navigate to the dashboard you want to make a variable for and click the **Dashboard settings** (gear) icon at the top of the page.
|
||||
1. On the **Variables** tab, click **New variable**.
|
||||
1. On the **Variables** tab, click **New**.
|
||||
1. Enter a **Name** for the variable.
|
||||
1. In the **Type** list, select **Query**.
|
||||
1. (Optional) In **Label**, enter the display name of the variable dropdown.
|
||||
@@ -87,10 +87,9 @@ Query expressions can contain references to other variables and in effect create
|
||||
1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source]({{< relref "../../../administration/data-source-management#add-a-data-source" >}}).
|
||||
1. In the **Refresh** list, select when the variable should update options.
|
||||
- **On Dashboard Load:** Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
|
||||
- **On Time Range Change:** Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
|
||||
- **On Time Range Change:** Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
|
||||
1. In the **Query** field, enter a query.
|
||||
- The query field varies according to your data source. Some data sources have custom query editors.
|
||||
- Make sure that the query returns values named `__text` and `__value` as appropriate in your query syntax. For example, in SQL, you can use a query such as `SELECT hostname AS __text, id AS __value FROM MyTable`. Queries for other languages will vary depending on syntax.
|
||||
- If you need more room in a single input field query editor, then hover your cursor over the lines in the lower right corner of the field and drag downward to expand.
|
||||
1. (Optional) In the **Regex** field, type a regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex]({{< relref "#filter-variables-with-regex" >}}).
|
||||
1. In the **Sort** list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
|
||||
@@ -248,13 +247,13 @@ Grafana has two built-in time range variables: `$__from` and `$__to`. They are c
|
||||
|
||||
> **Note:** This special formatting syntax is only available in Grafana 7.1.2+
|
||||
|
||||
| Syntax | Example result | Description |
|
||||
| ------------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `${__from}` | 1594671549254 | Unix millisecond epoch |
|
||||
| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 |
|
||||
| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 |
|
||||
| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch |
|
||||
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character. Uses browser time. Use `:date` or `:date:iso` for UTC |
|
||||
| Syntax | Example result | Description |
|
||||
| ------------------------ | ------------------------ | --------------------------------------------------------------------------------------------------------- |
|
||||
| `${__from}` | 1594671549254 | Unix millisecond epoch |
|
||||
| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 |
|
||||
| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 |
|
||||
| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch |
|
||||
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character |
|
||||
|
||||
The syntax above also works with `${__to}`.
|
||||
|
||||
@@ -329,7 +328,7 @@ Extremely complex linked templated dashboards are possible, 5 or 10 levels deep.
|
||||
The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click **Dashboard settings** (gear icon) and then click **Variables**. Both examples are expanded in the following section.
|
||||
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1&var-app=country&var-server=All&var-interval=1h)
|
||||
- [InfluxDB Templated](https://play.grafana.org/d/e7bad3ef-db0c-4bbd-8245-b85c0b2ca2b9/influx-2-73a-hourly-electric-grid-monitor-for-us?orgId=1&refresh=1m)
|
||||
- [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1)
|
||||
|
||||
### Examples explained
|
||||
|
||||
@@ -401,7 +400,7 @@ apps.fakesite.web_server_01.cpu.*
|
||||
|
||||
#### InfluxDB example
|
||||
|
||||
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/e7bad3ef-db0c-4bbd-8245-b85c0b2ca2b9/influx-2-73a-hourly-electric-grid-monitor-for-us?orgId=1&refresh=1m) dashboard.
|
||||
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1) dashboard.
|
||||
|
||||
In this example, when the user changes the value of the `datacenter` variable, it changes the dropdown options returned by the `host` variable. The `host` variable uses the **Multi-value** option and **Include all option**, allowing users to select some or all options presented at any time. The `datacenter` does not use either option, so you can only select one data center at a time.
|
||||
|
||||
@@ -570,7 +569,7 @@ demo.robustperception.io:9100
|
||||
|
||||
Using named capture groups, you can capture separate 'text' and 'value' parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.
|
||||
|
||||
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier than the `chip` value. So the following variable query result:
|
||||
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier that the `chip` value. So the following variable query result:
|
||||
|
||||
```text
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_0",chip_name="enp216s0f0np0"} 1
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
aliases:
|
||||
- data-sources/
|
||||
- overview/
|
||||
- ./features/datasources/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Data sources
|
||||
weight: 60
|
||||
---
|
||||
@@ -24,7 +29,7 @@ After you add and configure a data source, you can use it as an input for many o
|
||||
This documentation describes how to manage data sources in general,
|
||||
and how to configure or query the built-in data sources.
|
||||
For other data sources, refer to the list of [datasource plugins](/grafana/plugins/).
|
||||
To develop a custom plugin, refer to [Build a plugin](https://grafana.com/developers/plugin-tools).
|
||||
To develop a custom plugin, refer to [Build a plugin]({{< relref "../developers/plugins/" >}}).
|
||||
|
||||
## Manage data sources
|
||||
|
||||
@@ -47,7 +52,7 @@ For example, this video demonstrates the visual Prometheus query builder:
|
||||
|
||||
{{< vimeo 720004179 >}}
|
||||
|
||||
For general information about querying in Grafana, and common options and user interface elements across all query editors, refer to [Query and transform data]({{< relref "../panels-visualizations/query-transform-data" >}}).
|
||||
For general information about querying in Grafana, and common options and user interface elements across all query editors, refer to [Query and transform data]({{< relref "../panels-visualizations/query-transform-data/" >}}).
|
||||
|
||||
## Special data sources
|
||||
|
||||
|
||||
@@ -58,9 +58,6 @@ For more information, refer to [Azure documentation for role assignments](https:
|
||||
If you host Grafana in Azure, such as in App Service or Azure Virtual Machines, you can configure the Azure Monitor data source to use Managed Identity for secure authentication without entering credentials into Grafana.
|
||||
For details, refer to [Configuring using Managed Identity]({{< relref "#configuring-using-managed-identity" >}}).
|
||||
|
||||
You can configure the Azure Monitor data source to use Workload Identity for secure authentication without entering credentials into Grafana if you host Grafana in a Kubernetes environment, such as AKS, and require access to Azure resources.
|
||||
For details, refer to [Configuring using Workload Identity](#configuring-using-workload-identity).
|
||||
|
||||
| Name | Description |
|
||||
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Authentication** | Enables Managed Identity. Selecting Managed Identity hides many of the other fields. For details, see [Configuring using Managed Identity](#configuring-using-managed-identity). |
|
||||
@@ -112,21 +109,6 @@ datasources:
|
||||
version: 1
|
||||
```
|
||||
|
||||
**Workload Identity:**
|
||||
|
||||
```yaml
|
||||
apiVersion: 1 # config file version
|
||||
|
||||
datasources:
|
||||
- name: Azure Monitor
|
||||
type: grafana-azure-monitor-datasource
|
||||
access: proxy
|
||||
jsonData:
|
||||
azureAuthType: workloadidentity
|
||||
subscriptionId: <subscription-id> # Optional, default subscription
|
||||
version: 1
|
||||
```
|
||||
|
||||
#### Supported cloud names
|
||||
|
||||
| Azure Cloud | `cloudName` Value |
|
||||
@@ -137,8 +119,8 @@ datasources:
|
||||
|
||||
### Configure Managed Identity
|
||||
|
||||
You can use managed identity to configure Azure Monitor in Grafana if you host Grafana in Azure (such as an App Service or with Azure Virtual Machines) and have managed identity enabled on your VM.
|
||||
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations.
|
||||
If you host Grafana in Azure, such as an App Service or with Azure Virtual Machines, and have managed identity enabled on your VM, you can use managed identity to configure Azure Monitor in Grafana.
|
||||
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations for each.
|
||||
For details on Azure managed identities, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview).
|
||||
|
||||
**To enable managed identity for Grafana:**
|
||||
@@ -154,46 +136,7 @@ For details on Azure managed identities, refer to the [Azure documentation](http
|
||||
|
||||
This hides the directory ID, application ID, and client secret fields, and the data source uses managed identity to authenticate to Azure Monitor Metrics and Logs, and Azure Resource Graph.
|
||||
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-managed-identity-2.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor screenshot showing Managed Identity authentication" >}}
|
||||
|
||||
3. You can set the `managed_identity_client_id` field in the `[azure]` section of the [Grafana server configuration][configure-grafana-azure] to allow a user-assigned managed identity to be used instead of the default system-assigned identity.
|
||||
|
||||
```ini
|
||||
[azure]
|
||||
managed_identity_enabled = true
|
||||
managed_identity_client_id = USER_ASSIGNED_IDENTITY_CLIENT_ID
|
||||
```
|
||||
|
||||
### Configure Workload Identity
|
||||
|
||||
You can use workload identity to configure Azure Monitor in Grafana if you host Grafana in a Kubernetes environment, such as AKS, in conjunction with managed identities.
|
||||
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations.
|
||||
For details on workload identity, refer to the [Azure workload identity documentation](https://azure.github.io/azure-workload-identity/docs/).
|
||||
|
||||
**To enable workload identity for Grafana:**
|
||||
|
||||
1. Set the `workload_identity_enabled` flag in the `[azure]` section of the [Grafana server configuration][configure-grafana-azure].
|
||||
|
||||
```ini
|
||||
[azure]
|
||||
workload_identity_enabled = true
|
||||
```
|
||||
|
||||
2. In the Azure Monitor data source configuration, set **Authentication** to **Workload Identity**.
|
||||
|
||||
This hides the directory ID, application ID, and client secret fields, and the data source uses workload identity to authenticate to Azure Monitor Metrics and Logs, and Azure Resource Graph.
|
||||
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-workload-identity.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor screenshot showing Workload Identity authentication" >}}
|
||||
|
||||
3. There are additional configuration variables that can control the authentication method.`workload_identity_tenant_id` represents the Azure AD tenant that contains the managed identity, `workload_identity_client_id` represents the client ID of the managed identity if it differs from the default client ID, `workload_identity_token_file` represents the path to the token file. Refer to the [documentation](https://azure.github.io/azure-workload-identity/docs/) for more information on what values these variables should use, if any.
|
||||
|
||||
```ini
|
||||
[azure]
|
||||
workload_identity_enabled = true
|
||||
workload_identity_tenant_id = IDENTITY_TENANT_ID
|
||||
workload_identity_client_id = IDENTITY_CLIENT_ID
|
||||
workload_identity_token_file = TOKEN_FILE_PATH
|
||||
```
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-managed-identity.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor Metrics screenshot showing Dimensions" >}}
|
||||
|
||||
## Query the data source
|
||||
|
||||
|
||||
@@ -129,11 +129,6 @@ The Azure documentation includes resources to help you learn KQL:
|
||||
- [Tutorial: Use Kusto queries in Azure Monitor](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuremonitor)
|
||||
- [SQL to Kusto cheat sheet](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet)
|
||||
|
||||
> **Implicit dashboard time range usage:** As of Grafana v9.4.12 and v10.0, all Azure Monitor Logs queries
|
||||
> will use the specified dashboard or Explore time range by default.
|
||||
> Any query making use of a time range explicitly specified in the query body will have their query
|
||||
> executed against the intersection of the two time ranges. For more details on this change, refer to the [Azure Monitor Logs API documentation](https://learn.microsoft.com/en-us/rest/api/loganalytics/dataaccess/query/get?tabs=HTTP#uri-parameters).
|
||||
|
||||
This example query returns a virtual machine's CPU performance, averaged over 5ms time grains:
|
||||
|
||||
```kusto
|
||||
|
||||
@@ -134,7 +134,7 @@ The default values for "cloud monitoring auto" are:
|
||||
|
||||
The other automatic option is "grafana auto", which automatically sets the Group By time depending on the time range chosen and width of the time series panel.
|
||||
|
||||
For more information about "grafana auto", refer to [Interval variable]({{< relref "../../../dashboards/variables/add-template-variables#add-an-interval-variable" >}}).
|
||||
For more information about "grafana auto", refer to [Interval variable]({{< relref "../../../dashboards/variables/add-template-variables/#add-an-interval-variable" >}}).
|
||||
|
||||
You can also choose fixed time intervals to group by, like `1h` or `1d`.
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
You can also configure settings specific to the Graphite data source:
|
||||
|
||||
| Name | Description |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| **Version** | Select your version of Graphite. If you are using Grafana Cloud Graphite, this should be set to `1.1.x`. |
|
||||
| **Type** | Select your type of Graphite. If you are using Grafana Cloud Graphite, this should be set to `Default`. |
|
||||
| Name | Description |
|
||||
| ----------- | -------------------------------- |
|
||||
| **Version** | Select your version of Graphite. |
|
||||
| **Type** | Select your type of Graphite. |
|
||||
|
||||
### Integrate with Loki
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ weight: 700
|
||||
|
||||
# InfluxDB data source
|
||||
|
||||
{{< docs/shared lookup="influxdb/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared "influxdb/intro.md" >}}
|
||||
|
||||
Grafana includes built-in support for InfluxDB.
|
||||
This topic explains options, variables, querying, and other features specific to the InfluxDB data source, which include its [feature-rich code editor for queries and visual query builder]({{< relref "./query-editor/" >}}).
|
||||
|
||||
@@ -47,29 +47,3 @@ For more information, refer to [Add ad hoc filters]({{< relref "../../../dashboa
|
||||
You can use some global built-in variables in query variables: `$__interval`, `$__interval_ms`, `$__range`, `$__range_s`, and `$__range_ms`.
|
||||
|
||||
For more information, refer to [Global built-in variables]({{< relref "../../../dashboards/variables/add-template-variables#global-variables" >}}).
|
||||
|
||||
## Label extraction and indexing in Loki
|
||||
|
||||
Labels play a fundamental role in Loki's log aggregation and querying capabilities. When logs are ingested into Loki, they are often accompanied by metadata called labels, which provide contextual information about the log entries. These labels consist of key-value pairs and are essential for organizing, filtering, and searching log data efficiently.
|
||||
|
||||
### 1. Label extraction
|
||||
|
||||
During the ingestion process, Loki performs label extraction from the log lines. Loki's approach to label extraction is based on regular expressions, allowing users to specify custom patterns for parsing log lines and extracting relevant label key-value pairs. This flexibility enables Loki to adapt to various log formats and schemas.
|
||||
|
||||
For example, suppose you have log lines in the following format:
|
||||
|
||||
**2023-07-25 12:34:56 INFO: Request from IP A.B.C.D to endpoint /api/data**
|
||||
|
||||
To extract labels from this log format, you could define a regular expression to extract the log level ("INFO"), IP address ("A.B.C.D"), and endpoint ("/api/data") as labels. These labels can later be used to filter and aggregate log entries.
|
||||
|
||||
### 2. Indexing labels
|
||||
|
||||
Once labels are extracted, Loki efficiently indexes them. The index serves as a lookup mechanism that maps labels to the corresponding log entries. This indexing process enables faster retrieval of logs based on specific label criteria, significantly enhancing query performance.
|
||||
|
||||
For instance, if you have a label "job" that represents different services in your application, Loki will index the logs for each job separately. This indexing allows you to quickly query and analyze logs for individual jobs without the need to scan the entire log dataset.
|
||||
|
||||
By effectively extracting and indexing labels, Loki enables users to perform complex and targeted log queries without compromising on query speed and resource consumption.
|
||||
|
||||
Utilizing Loki's indexed labels in combination with Grafana's template variables provides a powerful way to interactively explore and visualize log data. Template variables allow users to create dynamic queries, selecting and filtering logs based on various labels, such as job names, instance IDs, severity levels, or any other contextual information attached to the log entries.
|
||||
|
||||
In conclusion, Loki's label extraction and indexing mechanisms are key components that contribute to its ability to handle vast amounts of log data efficiently. By making use of labels and template variables, users can easily gain valuable insights from their log data and troubleshoot issues effectively.
|
||||
|
||||
@@ -220,7 +220,7 @@ The resulting table panel:
|
||||
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.
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format).
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../../../developers/plugins/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.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ datasources:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
```
|
||||
|
||||
##### Using TLS verification
|
||||
##### Using TLS Verificaiton
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -273,7 +273,7 @@ The resulting table panel:
|
||||
|
||||
If you set Format as to _Time series_, then the query must have a column named time that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. In addition, result sets of time series queries must be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../../developers/plugins/data-frames#wide-format" >}}). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
@@ -460,7 +460,7 @@ ORDER BY atimestamp ASC
|
||||
|
||||
#### Disabling 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:
|
||||
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'`. Do disable quoting, use the csv formatting option for variables:
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
|
||||
@@ -35,15 +35,16 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| **Name** | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| **Default** | Default data source that will be be pre-selected for new panels. |
|
||||
| **URL** | The HTTP protocol, IP, and port of your OpenTSDB server (default port is usually 4242). |
|
||||
| **Allowed cookies** | Listing of cookies to forward to the data source. |
|
||||
| **Version** | The OpenTSDB version. |
|
||||
| **Resolution** | Metrics from OpenTSDB may have data points with either second or millisecond resolution. |
|
||||
| **Lookup limit** | Default is 1000. |
|
||||
| Name | Description |
|
||||
|
||||
| ------------------- | --------------------------------------------------------------------------------------- |
|
||||
| **Name** | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| **Default** | Default data source means that it will be pre-selected for new panels. |
|
||||
| **URL** | The HTTP protocol, IP, and port of your OpenTSDB server (default port is usually 4242) |
|
||||
| **Allowed cookies** | List the names of cookies to forward to the data source. |
|
||||
| **Version** | Version = opentsdb version, either <=2.1 or 2.2 |
|
||||
| **Resolution** | Metrics from opentsdb may have datapoints with either second or millisecond resolution. |
|
||||
| **Lookup limit** | Default is 1000. |
|
||||
|
||||
### Provision the data source
|
||||
|
||||
@@ -56,7 +57,7 @@ For more information about provisioning, and for available configuration options
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: OpenTSDB
|
||||
- name: OpenTsdb
|
||||
type: opentsdb
|
||||
access: proxy
|
||||
url: http://localhost:4242
|
||||
@@ -69,7 +70,7 @@ datasources:
|
||||
|
||||
Open a graph in edit mode by click the title. Query editor will differ if the data source has version <=2.1 or = 2.2.
|
||||
In the former version, only tags can be used to query OpenTSDB. But in the latter version, filters as well as tags
|
||||
can be used to query OpenTSDB. Fill Policy is also introduced in OpenTSDB 2.2.
|
||||
can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ The resulting table panel:
|
||||
|
||||
If you set Format as to _Time series_, then the query must have a column named time that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. In addition, result sets of time series queries must be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../../developers/plugins/data-frames#wide-format" >}}). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
|
||||
@@ -62,15 +62,16 @@ To configure basic settings for the data source, complete the following steps:
|
||||
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
|
||||
| `Custom query parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. |
|
||||
|
||||
**Exemplars configuration:**
|
||||
**Exemplars configuration:**
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Internal link** | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
|
||||
| **Data source** | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
|
||||
| **URL** | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
|
||||
| **URL label** | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
|
||||
| **Label name** | Adds a name for the exemplar traceID property. |
|
||||
| **Internal link** | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
|
||||
| **Data source** | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
|
||||
| **URL** | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
|
||||
| **URL label** | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
|
||||
| **Label name** | Adds a name for the exemplar traceID property. |
|
||||
|
||||
### Provision the data source
|
||||
|
||||
|
||||
@@ -14,56 +14,49 @@ weight: 300
|
||||
|
||||
# Prometheus query editor
|
||||
|
||||
Grafana provides a query editor for the Prometheus data source to create queries in PromQL. For more information about PromQL, see [Querying Prometheus](http://prometheus.io/docs/querying/basics/).
|
||||
|
||||
This topic explains querying specific to the Prometheus data source.
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
For options and functions common to all query editors, see [Query editors]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
## Choose a query editing mode
|
||||
|
||||
The Prometheus query editor has two modes:
|
||||
You can switch the Prometheus query editor between two modes:
|
||||
|
||||
- [Builder mode](#builder-mode)
|
||||
- [Code mode](#code-mode)
|
||||
- [Code mode](#code-mode), which provides a feature-rich editor for writing queries
|
||||
- [Builder mode](#builder-mode), which provides a visual query designer
|
||||
|
||||
Each mode is explained in greater detail below.
|
||||
{{< figure src="/static/img/docs/prometheus/header-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Editor toolbar" >}}
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/editing-mode.png" max-width="500px" class="docs-image--no-shadow" caption="Query editor mode" >}}
|
||||
To switch between the editor modes, select the corresponding **Builder** and **Code** tabs.
|
||||
|
||||
Both modes are synchronized, so you can switch between them. However, if there is an issue with the query while switching modes, a warning message will appear.
|
||||
To run a query, select **Run queries** located at the top of the editor.
|
||||
|
||||
## Toolbar elements
|
||||
> **Note:** To run Prometheus queries in [Explore]({{< relref "../../../explore" >}}), select **Run query**.
|
||||
|
||||
The query editor toolbar contains the following elements:
|
||||
Each mode is synchronized with the other modes, so you can switch between them without losing your work, although there are some limitations.
|
||||
|
||||
- **Kick start your query** - Click to see a list of operation patterns that help you quickly get started adding multiple operations to your query. These include:
|
||||
Builder mode doesn't yet support some complex queries.
|
||||
When you switch from Code mode to Builder mode with such a query, the editor displays a popup that explains how you might lose parts of the query if you continue.
|
||||
You can then decide whether you still want to switch to Builder mode.
|
||||
|
||||
- Rate query starters
|
||||
- Histogram query starters
|
||||
- Binary query starters
|
||||
You can also use the [Explain feature]({{< relref "#use-explain-mode-to-understand-queries" >}}) to help understand how a query works, and augment queries by using [template variables]({{< relref "./template-variables/" >}}).
|
||||
|
||||
Click the arrow next to each to see available options to add to your query.
|
||||
|
||||
- **Explain** - Toggle to display a step-by-step explanation of all query components and operations.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/explain-results.png" max-width="500px" class="docs-image--no-shadow" caption="Explain results" >}}
|
||||
|
||||
- **Builder/Code** - Click the corresponding **Builder** or **Code** tab on the toolbar to select a editor mode.
|
||||
For options and functions common to all query editors, refer to [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
## Configure common options
|
||||
|
||||
You can configure Prometheus-specific options in the query editor by setting several options regardless of mode.
|
||||
You can configure Prometheus-specific options in the query editor by setting several options regardless of its mode.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/options.png" max-width="500px" class="docs-image--no-shadow" caption="Options" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/options-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Options" >}}
|
||||
|
||||
### Legend
|
||||
|
||||
The **Legend** setting defines the time series's name. You can use a predefined or custom format.
|
||||
|
||||
- **Auto** - Displays unique labels. Also displays all overlapping labels if a series has multiple labels.
|
||||
- **Verbose** - Displays all label names.
|
||||
- **Custom** - Uses templating to select which labels will be included. For example, `{{hostname}}` is replaced by the label value for the label `hostname`. Clear the input and click outside of it to select another mode.
|
||||
| Option | Description |
|
||||
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Auto** | Shows the value of a single label for each series with only one label, or displays all labels if a series has multiple labels. |
|
||||
| **Verbose** | Displays all labels. |
|
||||
| **Custom** | Uses templating to select which labels will be included.<br/>For example, `{{hostname}}` is replaced by the label value for the label `hostname`.<br/>Clear the input and click outside of it to select another mode. |
|
||||
|
||||
### Min step
|
||||
|
||||
@@ -73,134 +66,155 @@ This setting supports the `$__interval` and `$__rate_interval` macros.
|
||||
|
||||
### Format
|
||||
|
||||
Switch between the following format options:
|
||||
You can switch between **Table**, **Time series**, and **Heatmap** options by configuring the query's **Format**.
|
||||
|
||||
- **Time series** - The default time series format. See [Time series kind formats](https://grafana.github.io/dataplane/timeseries/) for information on time series data frames and how time and value fields are structured.
|
||||
- **Table** - This works only in a [Table panel]({{< relref "../../../panels-visualizations/visualizations/table" >}}).
|
||||
- **Heatmap** - Displays metrics of the Histogram type on a [Heatmap panel]({{< relref "../../../panels-visualizations/visualizations/heatmap" >}}) by converting cumulative histograms to regular ones and sorting the series by the bucket bound.
|
||||
| Option | Description |
|
||||
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Table** | This works only in a [Table panel]{{< relref "../../../panels-visualizations/visualizations/table" >}}. |
|
||||
| **Time series** | Uses the default time series format. |
|
||||
| **Heatmap** | Displays metrics of the Histogram type on a [Heatmap panel]{{< relref "../../../panels-visualizations/visualizations/heatmap" >}} by converting cumulative histograms to regular ones and sorting the series by the bucket bound. |
|
||||
|
||||
### Type
|
||||
|
||||
The **Type** setting sets the query type. These include:
|
||||
The **Type** setting selects the query type.
|
||||
|
||||
- **Both** - The default option. Returns results for both a **Range** query and an **Instant** query.
|
||||
- **Range** - Returns a range vector consisting of a set of time series data containing a range of data points over time for each time series. You can choose lines, bars, points, stacked lines or stacked bars
|
||||
- **Instant** - Returns one data point per query and only the most recent point in the time range provided. The results can be shown in table format or as raw data. To depict instant query results in the time series panel, first add a field override, next add a property to the override named `Transform`, and finally select `Constant` from the **Transform** dropdown.
|
||||
- A **Range** query returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series.
|
||||
- An **Instant** query returns only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries and are well suited to look up label sets.
|
||||
|
||||
For more information, refer to the [Time Series Transform option documentation]({{< relref "../../../panels-visualizations/visualizations/time-series#transform" >}}).
|
||||
Instant query results are comprised of only one data point per series and can be shown in the time series panel by adding a field override, adding a property to the override named `Transform`, and selecting `Constant` from the **Transform** dropdown.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
This ensures a consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
|
||||
{{% /admonition %}}
|
||||
For more information, refer to the [Time Series Transform option documentation]({{< relref "../../../panels-visualizations/visualizations/time-series#transform" >}}).
|
||||
|
||||
### Exemplars
|
||||
- An **Exemplars** query runs with the regular query and shows exemplars in the graph.
|
||||
|
||||
Toggle **Exemplars** to run a query that includes exemplars in the graph. Exemplars are unique to Prometheus. For more information see [Introduction to exemplars](https://grafana.com/docs/grafana/latest/fundamentals/exemplars/).
|
||||
> **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
> This ensures a consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
There is no option to add exemplars with an **Instant** query type.
|
||||
{{% /admonition %}}
|
||||
## Code mode
|
||||
|
||||
### Inspector
|
||||
{{< figure src="/static/img/docs/prometheus/code-mode-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Code mode" >}}
|
||||
|
||||
Click **Inspector** to get detailed statistics regarding your query. Inspector functions as a kind of debugging tool that "inspects" your query. It provides query statistics under **Stats**, request response time under **Query**, data frame details under **{} JSON**, and the shape of your data under **Data**.
|
||||
In **Code mode**, you can write complex queries using a text editor with autocompletion features and syntax highlighting.
|
||||
It also contains a [Metrics browser]({{< relref "#metrics-browser" >}}) to further help you write queries.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/insepctor-9-5.png" max-width="500px" class="docs-image--no-shadow" caption="Inspector" >}}
|
||||
For more information about Prometheus's query language, refer to the [Prometheus documentation](http://prometheus.io/docs/querying/basics/).
|
||||
|
||||
### Use autocompletion
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/autocomplete-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Autocomplete" >}}
|
||||
|
||||
Code mode's autocompletion feature works automatically while typing.
|
||||
To manually trigger autocompletion, use the keyboard shortcut <key>Ctrl</key>/<key>Cmd</key> + <key>Space</key>.
|
||||
|
||||
The query editor can autocomplete static functions, aggregations, and keywords, and also dynamic items like metrics and labels.
|
||||
The autocompletion dropdown includes documentation for the suggested items where available.
|
||||
|
||||
To run a query in [Explore]({{< relref "../../../explore/" >}}), use the keyboard shortcut <key>Shift</key> + <key>Enter</key>.
|
||||
|
||||
### Metrics browser
|
||||
|
||||
The metrics browser locates metrics and selects relevant labels to help you build basic queries.
|
||||
When you open the browser, it displays all available metrics and labels.
|
||||
If supported by your Prometheus instance, each metric also displays its HELP and TYPE as a tooltip.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-browser-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Metrics browser" >}}
|
||||
|
||||
When you select a metric, the browser narrows down the available labels to show only the ones applicable to the metric.
|
||||
You can then select one or more labels for which the available label values are shown in lists in the bottom section.
|
||||
Select one or more values for each label to tighten your query scope.
|
||||
|
||||
> **Note:** If you do not remember a metric name to start with, you can also select a few labels to narrow down the list, then find relevant label values.
|
||||
|
||||
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string.
|
||||
The values section has only one search field, and its filtering applies to all labels to help you find values across labels once selected.
|
||||
|
||||
For example, among your labels `app`, `job`, `job_name` only one might with the value you are looking for.
|
||||
|
||||
Once you are satisfied with your query, click "Use query" to run the query. The button "Use as rate query" adds a `rate(...)[$__interval]` around your query to help write queries for counter metrics.
|
||||
The "Validate selector" button will check with Prometheus how many time series are available for that selector.
|
||||
|
||||
## Builder mode
|
||||
|
||||
**Builder mode** helps you build queries using a visual interface. This option is best for users who have limited or no previous experience working with Prometheus and PromQL.
|
||||
In **Builder mode**, you can build queries using a visual interface.
|
||||
|
||||
This video demonstrates how to use the visual Prometheus query builder available in Grafana v9.0:
|
||||
This video demonstrates how to use the visual Prometheus query builder available since Grafana v9.0:
|
||||
|
||||
{{< vimeo 720004179 >}}
|
||||
|
||||
</br>
|
||||
|
||||
### Metrics
|
||||
### Toolbar
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metrics-and-labels.png" max-width="500px" class="docs-image--no-shadow" caption="Metric and label filters" >}}
|
||||
In addition to the **Run query** button and mode switcher, Builder mode includes additional elements:
|
||||
|
||||
When you are ready to create a query, you can choose the specific metric name from the dropdown list under **Metric**.
|
||||
| Name | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| **Kick start your query** | A list of operation patterns that help you quickly add multiple operations to your query. |
|
||||
| **Explain** | Displays a step-by-step explanation of all query parts and its operations. |
|
||||
|
||||
### Metric and labels
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-select-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Metric and labels" >}}
|
||||
|
||||
Select a specific metric name from the dropdown list.
|
||||
The data source requests the list of available metrics from the Prometheus server based on the selected time rage.
|
||||
You can also enter text into the selector when the dropdown is open to search and filter the list.
|
||||
|
||||
### Label filters
|
||||
|
||||
Select desired labels and their values from the dropdown list.
|
||||
When a metric is selected, the data source requests available labels and their values from the server.
|
||||
Use the `+` button to add a label, and the `x` button to remove a label.
|
||||
|
||||
### Operations
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/operations.png" max-width="500px" class="docs-image--no-shadow" caption="Operations" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/operations-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Operations" >}}
|
||||
|
||||
Select the **+ Operations** button to add operations to your query.
|
||||
Select the `+ Operations` button to add operations to your query.
|
||||
The query editor groups operations into related sections, and you can type while the operations dropdown is open to search and filter the list.
|
||||
|
||||
The query editor groups operations into the following sections:
|
||||
The query editor displays a query's operations as boxes in the operations section.
|
||||
Each operation's header displays its name, and additional action buttons appear when you hover your cursor over the header:
|
||||
|
||||
- Aggregations - for additional information see [Aggregation operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators).
|
||||
- Range functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
- Functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
- Binary operations - for additional information see [Binary operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#binary-operators).
|
||||
- Trigonometric - for additional information see [Trigonometric functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#trigonometric-functions).
|
||||
- Time functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
| Button | Action |
|
||||
| ------ | ----------------------------------------------------------------- |
|
||||
| `v` | Replaces the operation with different operation of the same type. |
|
||||
| `info` | Opens the operation's description tooltip. |
|
||||
| `x` | Removes the operation. |
|
||||
|
||||
All operations have function parameters under the operation header. Click the `operator` to see a full list of supported functions. Some operations allow you to apply specific labels to functions.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/use-function-by-label-9-5.png" max-width="500px" class="docs-image--no-shadow" caption="Functions and labels" >}}
|
||||
Some operations have additional parameters under the operation header.
|
||||
For details about each operation, use the `info` button to view the operation's description, or refer to the Prometheus documentation on [query functions](https://prometheus.io/docs/prometheus/latest/querying/functions/).
|
||||
|
||||
Some operations make sense only when used in a specific order.
|
||||
If adding an operation would result in nonsensical query, the query editor adds the operation to the correct place.
|
||||
To re-order operations manually, drag the operation box by its name and drop it into the desired place.
|
||||
|
||||
#### Hints
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/hint-example.png" max-width="500px" class="docs-image--no-shadow" caption="Hint" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/hint-8-5.png" max-width="500px" class="docs-image--no-shadow" caption="Hint" >}}
|
||||
|
||||
The query editor can detect which operations are most appropriate for some selected metrics.
|
||||
If it does, it displays a hint next to the **+ Operations** button.
|
||||
If it does, it displays a hint next to the `+ Operations` button.
|
||||
|
||||
To add the operation to your query, click the **Hint**.
|
||||
To add the operations to your query, click the hint.
|
||||
|
||||
Once you are satisfied with your query, click **Run query**.
|
||||
## Use Explain mode to understand queries
|
||||
|
||||
## Code mode
|
||||
{{< figure src="/static/img/docs/prometheus/explain-8-5.png" max-width="500px" class="docs-image--no-shadow" caption="Explain mode" >}}
|
||||
|
||||
**Code mode** is for the experienced Prometheus user with prior expertise in PromQL, Prometheus' query language. The Code mode editor allows you to create queries just as you would in Prometheus. For more information about PromQL see [Querying Prometheus](http://prometheus.io/docs/querying/basics/).
|
||||
Explain mode helps you understand a query by displaying a step-by-step explanation of all query components and operations.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/code-mode.png" max-width="500px" class="docs-image--no-shadow" caption="Code mode" >}}
|
||||
### Additional options
|
||||
|
||||
The user interface (UI) also lets you select metrics, labels, filters and operations.
|
||||
In addition to these Builder mode-specific options, the query editor also displays the options it shares in common with Code mode.
|
||||
For details, refer to the [common options]({{< relref "#configure-common-options" >}}).
|
||||
|
||||
You can write complex queries using the text editor with autocompletion features and syntax highlighting.
|
||||
It also contains a [Metrics browser]({{< relref "#metrics-browser" >}}) to further help you write queries.
|
||||
## Apply annotations
|
||||
|
||||
### Use autocomplete
|
||||
[Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}}) overlay rich event information on top of graphs.
|
||||
You can add annotation queries in the Dashboard menu's Annotations view.
|
||||
|
||||
Code mode's autocomplete feature works automatically while typing. The query editor can autocomplete static functions, aggregations, keywords, and also dynamic items like metrics and labels.
|
||||
The autocompletion dropdown includes documentation for the suggested items where available.
|
||||
Prometheus supports two ways to query annotations.
|
||||
|
||||
### Metrics browser
|
||||
- A regular metric query
|
||||
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#inspecting-alerts-during-runtime))
|
||||
|
||||
The metrics browser locates metrics and selects relevant labels to help you build basic queries.
|
||||
When you click **Metrics browser**, it displays all available metrics and labels.
|
||||
If supported by your Prometheus instance, each metric also displays its `HELP` and `TYPE` as a tooltip.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-browser.png" max-width="500px" class="docs-image--no-shadow" caption="Metrics browser" >}}
|
||||
|
||||
When you select a metric under Step 1, the browser narrows down the available labels to show only the ones applicable to the metric.
|
||||
You can then select one or more labels shown in Step 2.
|
||||
Select one or more values in Step 3 for each label to tighten your query scope.
|
||||
In Step 4, you can select **Use query** to run the query, **Use as rate query** to add the rate operation to your query (`$__rate_interval`), **Validate selector** to verify the selector is valid and show the number of series found, or **Clear** to clear your selections and start over.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you do not remember a metric name, you can also select a few labels to narrow down the list, then find relevant label values.
|
||||
{{% /admonition %}}
|
||||
|
||||
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string.
|
||||
The values section has only one search field, and its filtering applies to all labels to help you find values across labels once selected.
|
||||
|
||||
For example, among your labels `app`, `job`, `job_name` only one might have the value you are looking for.
|
||||
|
||||
Once you are satisfied with your query, click **Run query**.
|
||||
The step option is useful to limit the number of events returned from your query.
|
||||
|
||||
@@ -15,14 +15,15 @@ weight: 400
|
||||
|
||||
# Prometheus template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables. Grafana refers to such variables as **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 an introduction to templating and template variables, see [Templating]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-variables" >}}).
|
||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-variables" >}}) documentation.
|
||||
|
||||
## Use query variables
|
||||
|
||||
You have the option to use several different variable types, but variables of the type `Query` will query Prometheus for a list of metrics, labels, label values, a query result or a series.
|
||||
Use variables of the type _Query_ to query Prometheus for a list of metrics, labels, or label values.
|
||||
|
||||
Select a Prometheus data source query type and enter the required inputs:
|
||||
|
||||
@@ -36,26 +37,6 @@ Select a Prometheus data source query type and enter the required inputs:
|
||||
|
||||
For details on _metric names_, _label names_, and _label values_, refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
||||
|
||||
### Query options
|
||||
|
||||
Under the query variable type, you can set the following query options:
|
||||
|
||||
| Option | Description |
|
||||
| --------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| **Data source** | Select your data source from the dropdown list. |
|
||||
| **Select query type** | Options are `default`, `value` and `metric name`. Each query type hits a different Prometheus endpoint. |
|
||||
| **Regex** | Optional, if you want to extract part of a series name or metric node segment. |
|
||||
| **Sort** | Default is `disabled`. Options include `alphabetical`, `numerical` and `alphabetical case-sensitive`. |
|
||||
| **Refresh** | When to update the values for the variable. Options are `On dashboard load` and `On time range change`. |
|
||||
|
||||
### Selection options
|
||||
|
||||
The following selection options are available:
|
||||
|
||||
- **Multi-value** - Check this option to enable multiple values to be selected at the same time.
|
||||
|
||||
- **Include All option** - Check this option to include all variables.
|
||||
|
||||
### Use interval and range variables
|
||||
|
||||
You can use some global built-in variables in query variables, for example, `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`.
|
||||
|
||||
@@ -58,25 +58,15 @@ To configure your Tempo data source to use this feature, refer to the [Tempo doc
|
||||
|
||||
To query a particular trace:
|
||||
|
||||
1. Select the **TraceQL** query type.
|
||||
1. Enter the trace's ID into the query field.
|
||||
1. Select the **TraceID** query type.
|
||||
1. Enter the trace's ID into the **Trace ID** field.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo TraceID query type" >}}
|
||||
|
||||
## Query by TraceQL
|
||||
|
||||
Inspired by PromQL and LogQL, TraceQL is a query language designed for selecting traces.
|
||||
The default traces search reviews the whole trace.
|
||||
TraceQL provides a method for formulating precise queries so you can zoom in to the data you need. Query results are returned faster because the queries limit what is searched
|
||||
|
||||
To learn more about how to query by TraceQL, refer to the [TraceQL documentation](/docs/tempo/latest/traceql).
|
||||
|
||||
You can create TraceQL queries using the Query editor or using Search query tab (preview feature).
|
||||
|
||||
[//]: # 'Include content for preview of Search tab featuring TraceQL query builder'
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/tempo-search-traceql.md" leveloffset="+1" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Query Loki for traces
|
||||
|
||||
To find traces to visualize, you can use the [Loki query editor]({{< relref "../../loki#loki-query-editor" >}}).
|
||||
|
||||
4
docs/sources/datasources/testdata/_index.md
vendored
4
docs/sources/datasources/testdata/_index.md
vendored
@@ -40,7 +40,7 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
## Create mock data
|
||||
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-testdata-add-10.0.png" class="docs-image--no-shadow" caption="Adding test data" >}}
|
||||
{{< figure src="/static/img/docs/v41/test_data_add.png" class="docs-image--no-shadow" caption="Adding test data" >}}
|
||||
|
||||
Once you've added the TestData data source, your Grafana instance's users can use it as a data source in any metric panel.
|
||||
|
||||
@@ -50,7 +50,7 @@ Instead of providing a query editor, the TestData data source helps you select a
|
||||
|
||||
You can assign an **Alias** to each scenario, and many have their own options that appear when selected.
|
||||
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-testdata-csv-example-10.0.png" class="docs-image--no-shadow" caption="Using CSV Metric Values" >}}
|
||||
{{< figure src="/static/img/docs/v41/test_data_csv_example.png" class="docs-image--no-shadow" caption="Using CSV Metric Values" >}}
|
||||
|
||||
**Available scenarios:**
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ AngularJS is an old frontend framework whose active development stopped many yea
|
||||
|
||||
## When will Angular plugins stop working?
|
||||
|
||||
Our goal is to transfer all the remaining Angular code to the core of Grafana before Grafana 10 is released in Summer 2023. Once this is done, the option "[angular_support_enabled](https://github.com/grafana/grafana/blob/d61bcdf4ca5e69489e0067c56fbe7f0bfdf84ee4/conf/defaults.ini#L362)" will be disabled by default for new Grafana Cloud users, resulting in the inability to use Angular plugins. In case you still rely on AngularJS-based plugins developed internally or by the community, you will need to enable this option to continue using them. Following the release of Grafana 10 we will be migrating Grafana Cloud users where possible and disabling Angular support when appropriate, we will also be introducing new features to help all users identify how they are impacted and to warn of the use of deprecated plugins within the Grafana UI.
|
||||
Our goal is to transfer all the remaining Angular code to the core of Grafana before Grafana 10 is released in Summer 2023. Once this is done, the option "[angular_support_enabled](https://github.com/grafana/grafana/blob/d61bcdf4ca5e69489e0067c56fbe7f0bfdf84ee4/conf/defaults.ini#L362)" will be disabled by default, resulting in the deactivation of all Angular plugins. In case you still rely on AngularJS-based plugins developed internally or by the community, you will need to enable this option to continue using them.
|
||||
|
||||
## When will we remove Angular support completely?
|
||||
|
||||
@@ -36,7 +36,6 @@ We encourage you to locate the repository of the corresponding plugin and create
|
||||
|
||||
### Links
|
||||
|
||||
- [Migrate Angular to React](https://grafana.com/developers/plugin-tools/migration-guides/migrate-angularjs-to-react)
|
||||
- [Migrate Angular to React](https://grafana.com/docs/grafana/latest/developers/plugins/migration-guide/#migrate-a-plugin-from-angular-to-react)
|
||||
- [Build a panel plugin](https://grafana.com/tutorials/build-a-panel-plugin/)
|
||||
- [Build a data source plugin](https://grafana.com/tutorials/build-a-data-source-plugin/)
|
||||
- [List of current Angular plugins]({{< relref "./angular-plugins/" >}})
|
||||
@@ -1,642 +0,0 @@
|
||||
---
|
||||
keywords:
|
||||
- grafana
|
||||
- plugins
|
||||
- plugin
|
||||
- angular
|
||||
- deprecation
|
||||
- migration
|
||||
title: Plugins using AngularJS
|
||||
---
|
||||
|
||||
The use of AngularJS in Grafana has been [deprecated]({{< relref "../angular_deprecation" >}}) and support for it will be removed in a future release.
|
||||
|
||||
This page is to help users of Grafana understand how they might be impacted by the removal of Angular support, and whether a migration option exists.
|
||||
|
||||
It lists the latest versions of plugins currently available in the [Plugins Catalog](https://grafana.com/plugins) which depend on Angular, and will stop working when Angular support is removed from Grafana. The list will be updated as more plugins migrate to React or offer migration advice.
|
||||
|
||||
> **Note:** We advise you to ensure you are running the latest version of plugins, as previous releases of plugins not listed here may still require AngularJS.
|
||||
|
||||
We also list the year in which the plugin was last updated in the catalog and where appropriate, highlight warnings for plugins where the source repository has not been updated in a number of years and appears inactive. This may help indicate the likelihood of a migration being undertaken, but is informational rather than definitive.
|
||||
|
||||
> **Note:** Plugins were updated to include signatures in 2021, so whilst a plugin may show as having been updated at that point - the last update to its functionality or dependencies may have been longer ago.
|
||||
|
||||
## What should I do with the information below?
|
||||
|
||||
- Consider the available migration steps.
|
||||
- Check your Grafana instances for usage of these plugins - see information here on [browsing installed plugins]({{< relref "../../administration/plugin-management/#browse-plugins" >}}).
|
||||
- Review the project repositories to add your support to any migration issues.
|
||||
|
||||
## I'm a plugin author
|
||||
|
||||
We are greatly appreciative of the developers who have contributed plugins to the Grafana ecosystem, your work has helped support millions of users to gain insights into their data. A plugin being listed below is no reflection on its quality, and is purely to help users understand the impact of the removal of Angular support in Grafana.
|
||||
|
||||
Guidance on migrating a plugin to React can be found in our [migration guide](https://grafana.com/developers/plugin-tools/migration-guides/migrate-angularjs-to-react). If you would like to add any specific migration guidance for your plugin here or update our assessment, please open a PR by clicking the `Suggest an edit` button at the bottom of this page.
|
||||
|
||||
# Current AngularJS based plugins
|
||||
|
||||
## Apps
|
||||
|
||||
### [Cloudflare Grafana App](https://grafana.com/grafana/plugins/cloudflare-app/)
|
||||
|
||||
Latest Version: 0.2.4 | Signature: Commercial | Last Updated: 2022
|
||||
|
||||
### [DevOpsProdigy KubeGraf](https://grafana.com/grafana/plugins/devopsprodigy-kubegraf-app/)
|
||||
|
||||
Latest Version: 1.5.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Issues](https://github.com/devopsprodigy/kubegraf/issues/71) in the project repository suggest that the project _may_ be unsupported.
|
||||
|
||||
> **Migration available - potential alternative:** Grafana Cloud includes a [Kubernetes integration](https://grafana.com/solutions/kubernetes/).
|
||||
|
||||
### [Kentik Connect Pro](https://grafana.com/grafana/plugins/kentik-connect-app/)
|
||||
|
||||
Latest Version: 1.6.2 | Signature: Commercial | Last Updated: 2023
|
||||
|
||||
## Datasources
|
||||
|
||||
### [Druid](https://grafana.com/grafana/plugins/abhisant-druid-datasource/)
|
||||
|
||||
Latest Version: v0.0.6 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Migration available - plugin superseded:** The original plugin only claims support for Grafana v4.x.x, it was replaced with a [new plugin](https://grafana.com/grafana/plugins/grafadruid-druid-datasource/) based on React.
|
||||
|
||||
### [Akumuli](https://grafana.com/grafana/plugins/akumuli-datasource/)
|
||||
|
||||
Latest Version: 1.3.12 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Issues](https://github.com/akumuli/Akumuli/issues/379) in the project repository suggest that the project _may_ be unsupported.
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/akumuli/Akumuli/) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [DarkSky](https://grafana.com/grafana/plugins/andig-darksky-datasource/)
|
||||
|
||||
Latest Version: 1.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/andig/grafana-darksky) was archived on September 27, 2022.
|
||||
|
||||
> **Warning:** Apple removed support for the DarkSky API on March 31, 2023 - [source](https://support.apple.com/en-us/HT213526).
|
||||
|
||||
### [Finance](https://grafana.com/grafana/plugins/ayoungprogrammer-finance-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Issues](https://github.com/ayoungprogrammer/grafana-finance/issues/7) in the project repository suggest that the project _may_ be unsupported.
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/ayoungprogrammer/grafana-finance) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Prometheus AlertManager](https://grafana.com/grafana/plugins/camptocamp-prometheus-alertmanager-datasource/)
|
||||
|
||||
Latest Version: 1.2.1 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/camptocamp/grafana-prometheus-alertmanager-datasource) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** Grafana includes an AlertManager data source as a Core plugin.
|
||||
|
||||
### [Chaos Mesh](https://grafana.com/grafana/plugins/chaosmeshorg-datasource/)
|
||||
|
||||
Latest Version: 2.2.3 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/chaos-mesh/datasource) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Cognite Data Fusion](https://grafana.com/grafana/plugins/cognitedata-datasource/)
|
||||
|
||||
Latest Version: 3.0.0 | Signature: Commercial | Last Updated: 2023
|
||||
|
||||
### [DeviceHive](https://grafana.com/grafana/plugins/devicehive-devicehive-datasource/)
|
||||
|
||||
Latest Version: 2.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/devicehive/devicehive-grafana-datasource) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Google BigQuery](https://grafana.com/grafana/plugins/doitintl-bigquery-datasource/)
|
||||
|
||||
Latest Version: 2.0.3 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Migration available - plugin superseded:** Grafana provides its own [Google BigQuery Plugin](https://grafana.com/grafana/plugins/grafana-bigquery-datasource/). The previous [Project repository](https://github.com/doitintl/bigquery-grafana) was archived on December 11, 2022 with a recommendation to migrate to the aforementioned Grafana provided plugin.
|
||||
|
||||
### [Open-Falcon](https://grafana.com/grafana/plugins/fastweb-openfalcon-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/open-falcon/grafana-openfalcon-datasource) suggests support for Grafana v4.2 - Grafana v5.4.
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/open-falcon/grafana-openfalcon-datasource) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
### [GraphQL Data Source](https://grafana.com/grafana/plugins/fifemon-graphql-datasource/)
|
||||
|
||||
Latest Version: 1.3.0 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Project support is unclear after a request for new maintainers - [source](https://github.com/fifemon/graphql-datasource/issues/77).
|
||||
|
||||
> **Migration available - potential alternative:** The [Infinity](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/) data source supports GraphQL.
|
||||
|
||||
### [Cloudera Manager](https://grafana.com/grafana/plugins/foursquare-clouderamanager-datasource/)
|
||||
|
||||
Latest Version: 0.9.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/foursquare/datasource-plugin-clouderamanager) in the past 7 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Simple Annotations](https://grafana.com/grafana/plugins/fzakaria-simple-annotations-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin only claims support for Grafana v4.x.x.
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/fzakaria/simple-annotations-plugin/) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Warning:** Developer no longer maintains the project, but is open to contributions: https://github.com/fzakaria/simple-annotations-plugin/issues/2
|
||||
|
||||
### [Gnocchi](https://grafana.com/grafana/plugins/gnocchixyz-gnocchi-datasource/)
|
||||
|
||||
Latest Version: 1.7.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin only claims support for Grafana v4.x.x
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/gnocchixyz/grafana-gnocchi-datasource) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [MetaQueries](https://grafana.com/grafana/plugins/goshposh-metaqueries-datasource/)
|
||||
|
||||
Latest Version: 0.0.9 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/GoshPosh/grafana-meta-queries) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Open Distro for Elasticsearch](https://grafana.com/grafana/plugins/grafana-es-open-distro-datasource/)
|
||||
|
||||
Latest Version: 1.0.6 | Signature: Grafana | Last Updated: 2021
|
||||
|
||||
> **Migration available - plugin superseded:** Plugin was deprecated in favour of the [OpenSearch Plugin](https://grafana.com/grafana/plugins/grafana-opensearch-datasource/).
|
||||
|
||||
### [KairosDB](https://grafana.com/grafana/plugins/grafana-kairosdb-datasource/)
|
||||
|
||||
Latest Version: 3.0.2 | Signature: Grafana | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/grafana/kairosdb-datasource) was archived on August 30th, 2021 and is no longer maintained.
|
||||
|
||||
### [SimpleJson](https://grafana.com/grafana/plugins/grafana-simple-json-datasource/)
|
||||
|
||||
Latest Version: 1.4.2 | Signature: Grafana | Last Updated: 2021
|
||||
|
||||
> **Migration available - potential alternative:** [Project repository](https://github.com/grafana/simple-json-datasource) is no longer maintained, but a number of alternatives exist, including - [Infinity](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/), [JSON](https://grafana.com/grafana/plugins/simpod-json-datasource) and [JSON API](https://grafana.com/grafana/plugins/marcusolsson-json-datasource).
|
||||
|
||||
> **Note:** If you're looking for an example of a data source plugin to start from, refer to [grafana-starter-datasource-backend](https://github.com/grafana/grafana-starter-datasource-backend).
|
||||
|
||||
### [Splunk](https://grafana.com/grafana/plugins/grafana-splunk-datasource/)
|
||||
|
||||
Latest Version: 4.1.6 | Signature: Grafana | Last Updated: 2023
|
||||
|
||||
> **Note:** Removal of any angular dependency is on the near term roadmap.
|
||||
|
||||
### [Strava](https://grafana.com/grafana/plugins/grafana-strava-datasource/)
|
||||
|
||||
Latest Version: 1.5.1 | Signature: Grafana | Last Updated: 2022
|
||||
|
||||
> **Note:** Removal of any angular dependency is on the near term roadmap.
|
||||
|
||||
### [openHistorian](https://grafana.com/grafana/plugins/gridprotectionalliance-openhistorian-datasource/)
|
||||
|
||||
Latest Version: 1.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/GridProtectionAlliance/openHistorian-grafana/) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [OSIsoft-PI](https://grafana.com/grafana/plugins/gridprotectionalliance-osisoftpi-datasource/)
|
||||
|
||||
Latest Version: 3.1.0 | Signature: Community | Last Updated: 2023
|
||||
|
||||
> **Note:** Fixed in 4.0.0 which should be published soon - [source](https://github.com/GridProtectionAlliance/osisoftpi-grafana/issues/119#issuecomment-1493566212).
|
||||
|
||||
### [Hawkular](https://grafana.com/grafana/plugins/hawkular-datasource/)
|
||||
|
||||
Latest Version: 1.1.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/hawkular/hawkular-grafana-datasource) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Humio](https://grafana.com/grafana/plugins/humio-datasource/)
|
||||
|
||||
Latest Version: 3.3.1 | Signature: Commercial | Last Updated: 2022
|
||||
|
||||
### [IBM APM](https://grafana.com/grafana/plugins/ibm-apm-datasource/)
|
||||
|
||||
Latest Version: 0.9.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/rafal-szypulka/grafana-ibm-apm) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [PRTG](https://grafana.com/grafana/plugins/jasonlashua-prtg-datasource/)
|
||||
|
||||
Latest Version: 4.0.4 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/neuralfraud/grafana-prtg) in the past 4 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Warning:** Unmaintained since 2017 - [source](https://github.com/neuralfraud/grafana-prtg/wiki).
|
||||
|
||||
### [LinkSmart HDS Datasource](https://grafana.com/grafana/plugins/linksmart-hds-datasource/)
|
||||
|
||||
Latest Version: 1.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/linksmart/grafana-hds-datasource) was archived on April 4th, 2022 and is no longer maintained.
|
||||
|
||||
### [LinkSmart SensorThings](https://grafana.com/grafana/plugins/linksmart-sensorthings-datasource/)
|
||||
|
||||
Latest Version: 1.3.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/linksmart/grafana-sensorthings-datasource) was archived on April 4th, 2022 and is no longer maintained.
|
||||
|
||||
### [Monasca](https://grafana.com/grafana/plugins/monasca-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/openstack/monasca-grafana-datasource) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Warning:** Last updated to support Grafana v7.
|
||||
|
||||
### [Monitoring Art](https://grafana.com/grafana/plugins/monitoringartist-monitoringart-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/monitoringartist/grafana-monitoring-art) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [GoogleCalendar](https://grafana.com/grafana/plugins/mtanda-google-calendar-datasource/)
|
||||
|
||||
Latest Version: 1.0.5 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/mtanda/grafana-google-calendar-datasource) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [USGS Water Services](https://grafana.com/grafana/plugins/natel-usgs-datasource/)
|
||||
|
||||
Latest Version: 0.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/NatelEnergy/natel-usgs-datasource) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [ntopng](https://grafana.com/grafana/plugins/ntop-ntopng-datasource/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Migration available - plugin superseded:** this plugin was [discontinued in favour of the InfluxDB data source](https://github.com/ntop/ntopng-grafana-datasource) - a Core plugin included in Grafana, additional guidance is available [here](https://www.ntop.org/guides/ntopng/basic_concepts/timeseries.html#influxdb-driver).
|
||||
|
||||
### [Oracle Cloud Infrastructure Logs](https://grafana.com/grafana/plugins/oci-logs-datasource/)
|
||||
|
||||
Latest Version: 3.0.0 | Signature: Commercial | Last Updated: 2023
|
||||
|
||||
### [Oracle Cloud Infrastructure Metrics](https://grafana.com/grafana/plugins/oci-metrics-datasource/)
|
||||
|
||||
Latest Version: 4.0.0 | Signature: Commercial | Last Updated: 2023
|
||||
|
||||
### [Warp 10](https://grafana.com/grafana/plugins/ovh-warp10-datasource/)
|
||||
|
||||
Latest Version: 2.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Project repository](https://github.com/ovh/ovh-warp10-datasource) was archived on March 22nd, 2023 and is no longer maintained.
|
||||
|
||||
### [KapacitorSimpleJson](https://grafana.com/grafana/plugins/paytm-kapacitor-datasource/)
|
||||
|
||||
Latest Version: 0.1.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/paytm/kapacitor-grafana-datasource-plugin) in the past 4 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Ambari Metrics](https://grafana.com/grafana/plugins/praj-ams-datasource/)
|
||||
|
||||
Latest Version: 1.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/prajwalrao/ambari-metrics-grafana) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Solr](https://grafana.com/grafana/plugins/pue-solr-datasource/)
|
||||
|
||||
Latest Version: 1.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Unclear progress on migration to React - [issue](https://github.com/pueteam/datasource-plugin-solr/issues/12).
|
||||
|
||||
> **Migration available - potential alternative:** Users could configure the solr-exporter for Prometheus as described [here](https://solr.apache.org/guide/solr/latest/deployment-guide/monitoring-with-prometheus-and-grafana.html).
|
||||
|
||||
### [QuasarDB](https://grafana.com/grafana/plugins/quasardb-datasource/)
|
||||
|
||||
Latest Version: 3.8.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
### [Blueflood](https://grafana.com/grafana/plugins/rackerlabs-blueflood-datasource/)
|
||||
|
||||
Latest Version: 0.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/rax-maas/blueflood-grafana) in the past 7 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [NetXMS](https://grafana.com/grafana/plugins/radensolutions-netxms-datasource/)
|
||||
|
||||
Latest Version: 1.2.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/netxms/grafana) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Shoreline Data Source](https://grafana.com/grafana/plugins/shorelinesoftware-shoreline-datasource/)
|
||||
|
||||
Latest Version: 1.1.0 | Signature: Commercial | Last Updated: 6 months ago
|
||||
|
||||
### [Sidewinder](https://grafana.com/grafana/plugins/sidewinder-datasource/)
|
||||
|
||||
Latest Version: 0.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/srotya/sidewinder-grafana) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Skydive](https://grafana.com/grafana/plugins/skydive-datasource/)
|
||||
|
||||
Latest Version: 1.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/skydive-project/skydive-grafana-datasource) in the past 4 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Warning:** Issues suggest the entire project, not just the plugin, may be abandoned - [source](https://github.com/skydive-project/skydive/issues/2417).
|
||||
|
||||
### [Heroic](https://grafana.com/grafana/plugins/spotify-heroic-datasource/)
|
||||
|
||||
Latest Version: 0.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Plugin](https://github.com/spotify/spotify-heroic-datasource) and [Heroic](https://github.com/spotify/heroic) were both archived on April 17th, 2021 and March 27th, 2021 respectively.
|
||||
|
||||
### [Heroic](https://grafana.com/grafana/plugins/udoprog-heroic-datasource/)
|
||||
|
||||
Latest Version: 0.1.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Plugin](https://github.com/udoprog/udoprog-heroic-datasource) and [Heroic](https://github.com/spotify/heroic) were both archived on October 16th, 2022 and March 27th, 2021 respectively.
|
||||
|
||||
### [Altinity plugin for ClickHouse](https://grafana.com/grafana/plugins/vertamedia-clickhouse-datasource/)
|
||||
|
||||
Latest Version: 2.5.3 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Note:** The [migration issue](https://github.com/Altinity/clickhouse-grafana/issues/475) has been assigned to a new major version milestone.
|
||||
|
||||
### [Pagerduty](https://grafana.com/grafana/plugins/xginn8-pagerduty-datasource/)
|
||||
|
||||
Latest Version: 0.2.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/skydive-project/skydive-grafana-datasource) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Warning:** Plugin only claims support for Grafana v5.
|
||||
|
||||
### [Chaos Mesh](https://grafana.com/grafana/plugins/yeya24-chaosmesh-datasource/)
|
||||
|
||||
Latest Version: 0.2.3 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Plugin declares itself deprecated in favour of [chaosmeshorg-datasource](https://grafana.com/grafana/plugins/chaosmeshorg-datasource/) which also appears above in this list with warnings around its future.
|
||||
|
||||
## Panels
|
||||
|
||||
### [FlowCharting](https://grafana.com/grafana/plugins/agenty-flowcharting-panel/)
|
||||
|
||||
Latest Version: 0.9.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/algenty/grafana-flowcharting) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
### [HTML](https://grafana.com/grafana/plugins/aidanmountford-html-panel/)
|
||||
|
||||
Latest Version: 0.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/aidanmountford/aidanmountford-html-panel) in the past 4 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** The [Text]({{< relref "../../panels-visualizations/visualizations/text/#html" >}}) panel included with Grafana supports rendering HTML content.
|
||||
|
||||
### [Track Map](https://grafana.com/grafana/plugins/alexandra-trackmap-panel/)
|
||||
|
||||
Latest Version: 1.2.6 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** [Issue](https://github.com/alexandrainst/alexandra-trackmap-panel/issues/72#issuecomment-1332179974) suggests problems with ongoing maintenance unless new contributors are found.
|
||||
|
||||
> **Warning:** [Migration issue](https://github.com/alexandrainst/alexandra-trackmap-panel/issues/105) has been marked as needing help.
|
||||
|
||||
### [PictureIt](https://grafana.com/grafana/plugins/bessler-pictureit-panel/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/vbessler/grafana-pictureit) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** another plugin exists which provides similar capabilities - [ePict](https://grafana.com/grafana/plugins/larona-epict-panel/).
|
||||
|
||||
### [Singlestat Math](https://grafana.com/grafana/plugins/blackmirror1-singlestat-math-panel/)
|
||||
|
||||
Latest Version: 1.1.8 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/black-mirror-1/singlestat-math) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Status By Group Panel](https://grafana.com/grafana/plugins/blackmirror1-statusbygroup-panel/)
|
||||
|
||||
Latest Version: 1.1.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/black-mirror-1/Grafana_Status_panel) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Datatable Panel](https://grafana.com/grafana/plugins/briangann-datatable-panel/)
|
||||
|
||||
Latest Version: 1.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Note:** Migration to react is planned - [issue](https://github.com/briangann/grafana-datatable-panel/issues/174).
|
||||
|
||||
### [D3 Gauge](https://grafana.com/grafana/plugins/briangann-gauge-panel/)
|
||||
|
||||
Latest Version: 0.0.9 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Note:** Migration to react is a planned [update](https://github.com/briangann/grafana-gauge-panel/issues/740).
|
||||
|
||||
### [GeoLoop](https://grafana.com/grafana/plugins/citilogics-geoloop-panel/)
|
||||
|
||||
Latest Version: 1.1.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/CitiLogics/citilogics-geoloop-panel) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Progress List](https://grafana.com/grafana/plugins/corpglory-progresslist-panel/)
|
||||
|
||||
Latest Version: 1.0.6 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/CorpGlory/grafana-progress-list) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Bubble Chart](https://grafana.com/grafana/plugins/digrich-bubblechart-panel/)
|
||||
|
||||
Latest Version: 1.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/digrich/bubblechart-panel) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Blendstat](https://grafana.com/grafana/plugins/farski-blendstat-panel/)
|
||||
|
||||
Latest Version: 1.0.3 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Migration available - potential alternative:** plugin author recommends use of single stat panel and transformations functionality - [source](https://github.com/farski/blendstat-grafana/issues/11#issuecomment-1112158909).
|
||||
|
||||
### [WindRose](https://grafana.com/grafana/plugins/fatcloud-windrose-panel/)
|
||||
|
||||
Latest Version: 0.7.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/fatcloud/windrose-panel) in the past 4 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Statusmap](https://grafana.com/grafana/plugins/flant-statusmap-panel/)
|
||||
|
||||
Latest Version: 0.5.1 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Unknown whether migration to react will be undertaken - [migration issue](https://github.com/flant/grafana-statusmap/issues/302).
|
||||
|
||||
### [Singlestat](https://grafana.com/grafana/plugins/grafana-singlestat-panel/)
|
||||
|
||||
Latest Version: 2.0.0 | Signature: Grafana | Last Updated: 2022
|
||||
|
||||
> **Migration available - plugin superseded:** Singlestat plugin was replaced by the [Stat]({{< relref "../../panels-visualizations/visualizations/stat/" >}})panel included in Grafana.
|
||||
|
||||
### [Worldmap Panel](https://grafana.com/grafana/plugins/grafana-worldmap-panel/)
|
||||
|
||||
Latest Version: 1.0.3 | Signature: Grafana | Last Updated: 2023
|
||||
|
||||
> **Migration available - plugin superseded:** Worldmap plugin was replaced by [Geomap]({{< relref "../../panels-visualizations/visualizations/geomap/" >}}) panel included in Grafana.
|
||||
|
||||
### [Topology Panel](https://grafana.com/grafana/plugins/gretamosa-topology-panel/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/gretamosa/gretamosa-topology-panel) in the past 4 years suggests project _may_ not be actively maintained
|
||||
|
||||
### [SVG](https://grafana.com/grafana/plugins/marcuscalidus-svg-panel/)
|
||||
|
||||
Latest Version: 0.3.4 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/MarcusCalidus/marcuscalidus-svg-panel) in the past year suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** another plugin exists which provides similar capabilities - [aceiot-svg-panel](https://grafana.com/grafana/plugins/aceiot-svg-panel/)
|
||||
|
||||
### [Annunciator](https://grafana.com/grafana/plugins/michaeldmoore-annunciator-panel/)
|
||||
|
||||
Latest Version: 1.1.0 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin developer has indicated they will retire the plugin once Angular support is discontinued - [source](https://github.com/michaeldmoore/michaeldmoore-annunciator-panel/issues/24#issuecomment-1479372673).
|
||||
|
||||
### [Multistat](https://grafana.com/grafana/plugins/michaeldmoore-multistat-panel/)
|
||||
|
||||
Latest Version: 1.7.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin developer has indicated they will retire the plugin once Angular support is discontinued - [source](https://github.com/michaeldmoore/michaeldmoore-multistat-panel/issues/71#issuecomment-1479372977).
|
||||
|
||||
### [HeatmapEpoch](https://grafana.com/grafana/plugins/mtanda-heatmap-epoch-panel/)
|
||||
|
||||
Latest Version: 0.1.8 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin advises caution as not stable; [project repository](https://github.com/mtanda/grafana-heatmap-epoch-panel) has not been updated in 7 years.
|
||||
|
||||
> **Migration available - potential alternative:** Other Heatmap panels exist including natively in Grafana - [learn more]({{< relref "../../panels-visualizations/visualizations/heatmap/" >}}).
|
||||
|
||||
### [Histogram](https://grafana.com/grafana/plugins/mtanda-histogram-panel/)
|
||||
|
||||
Latest Version: 0.1.7 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/mtanda/grafana-histogram-panel) in the past 7 years suggests project _may_ not be actively maintained
|
||||
|
||||
> **Migration available - potential alternative:** other Histogram panels exist including natively in Grafana - [learn more]({{< relref "../../panels-visualizations/visualizations/histogram/" >}}).
|
||||
|
||||
### [Separator](https://grafana.com/grafana/plugins/mxswat-separator-panel/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/mxswat/grafana-separator-panel) in the past 5 years suggests project _may_ not be actively maintained
|
||||
|
||||
> **Migration available - potential alternative:** the [Text]({{< relref "../../panels-visualizations/visualizations/text/#html" >}}) panel can be used with no data to provide space within dashboards.
|
||||
|
||||
### [Discrete](https://grafana.com/grafana/plugins/natel-discrete-panel/)
|
||||
|
||||
Latest Version: 0.1.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/NatelEnergy/grafana-discrete-panel) in the past 3 years suggests project _may_ not be actively maintained
|
||||
|
||||
### [Influx Admin](https://grafana.com/grafana/plugins/natel-influx-admin-panel/)
|
||||
|
||||
Latest Version: 0.0.6 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/NatelEnergy/grafana-influx-admin) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Plotly](https://grafana.com/grafana/plugins/natel-plotly-panel/)
|
||||
|
||||
Latest Version: 0.0.7 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/NatelEnergy/grafana-plotly-panel) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** another plugin exists which provides similar capabilities - [nline-plotlyjs-panel/](https://grafana.com/grafana/plugins/nline-plotlyjs-panel/).
|
||||
|
||||
### [Cal-HeatMap](https://grafana.com/grafana/plugins/neocat-cal-heatmap-panel/)
|
||||
|
||||
Latest Version: 0.0.4 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Plugin advises caution as not stable; [project repository](https://github.com/NeoCat/grafana-cal-heatmap-panel) has not been updated in 7 years.
|
||||
|
||||
> **Migration available - potential alternative:** other Heatmap panels exist including natively in Grafana - [learn more]({{< relref "../../panels-visualizations/visualizations/heatmap/" >}}).
|
||||
|
||||
### [Annotation Panel](https://grafana.com/grafana/plugins/novalabs-annotations-panel/)
|
||||
|
||||
Latest Version: 0.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/novalabs/grafana-annotations-panel) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Carpet plot](https://grafana.com/grafana/plugins/petrslavotinek-carpetplot-panel/)
|
||||
|
||||
Latest Version: 0.1.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/petrslavotinek/grafana-carpetplot) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [TrackMap](https://grafana.com/grafana/plugins/pr0ps-trackmap-panel/)
|
||||
|
||||
Latest Version: 2.1.4 | Signature: Community | Last Updated: 2023
|
||||
|
||||
> **Warning:** Unknown whether migration to react will be undertaken - [migration issue](https://github.com/pR0Ps/grafana-trackmap-panel/issues/84).
|
||||
|
||||
### [AJAX](https://grafana.com/grafana/plugins/ryantxu-ajax-panel/)
|
||||
|
||||
Latest Version: 0.1.0 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/ryantxu/ajax-panel) in the past 2 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Annotation List](https://grafana.com/grafana/plugins/ryantxu-annolist-panel/)
|
||||
|
||||
Latest Version: 0.0.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Migration available - plugin superseded:** [Project repository](https://github.com/ryantxu/annotations-panel) for the plugin was archived on July 13th, 2019 in favour of native [annotations]({{< relref "../../panels-visualizations/visualizations/annotations/" >}}).
|
||||
|
||||
### [3D Globe Panel](https://grafana.com/grafana/plugins/satellogic-3d-globe-panel/)
|
||||
|
||||
Latest Version: 0.1.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/satellogic/grafana-3d-globe-panel) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Heatmap](https://grafana.com/grafana/plugins/savantly-heatmap-panel/)
|
||||
|
||||
Latest Version: 0.2.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/savantly-net/grafana-heatmap) in the past 6 years suggests project _may_ not be actively maintained.
|
||||
|
||||
> **Migration available - potential alternative:** other Heatmap panels exist including natively in Grafana - [learn more]({{< relref "../../panels-visualizations/visualizations/heatmap/" >}}).
|
||||
|
||||
### [SCADAvis Synoptic Panel](https://grafana.com/grafana/plugins/scadavis-synoptic-panel/)
|
||||
|
||||
Latest Version: 1.0.5 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/riclolsen/scadavis-synoptic-panel) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [TrafficLight](https://grafana.com/grafana/plugins/smartmakers-trafficlight-panel/)
|
||||
|
||||
Latest Version: 1.0.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/smartmakers/grafana-trafficlight) in the past 5 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Radar Graph](https://grafana.com/grafana/plugins/snuids-radar-panel/)
|
||||
|
||||
Latest Version: 1.5.1 | Signature: Community | Last Updated: 2022
|
||||
|
||||
> **Warning:** Unknown whether migration to react will be undertaken - [migration issue](https://github.com/snuids/grafana-radar-panel/issues/29).
|
||||
|
||||
### [Traffic Lights](https://grafana.com/grafana/plugins/snuids-trafficlights-panel/)
|
||||
|
||||
Latest Version: 1.6.0 | Signature: Community | Last Updated: 2023
|
||||
|
||||
> **Warning:** Unknown whether migration to react will be undertaken - [migration issue](https://github.com/snuids/trafficlights-panel/issues/44).
|
||||
|
||||
### [Status Panel](https://grafana.com/grafana/plugins/vonage-status-panel/)
|
||||
|
||||
Latest Version: 1.0.11 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/Vonage/Grafana_Status_panel) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Boom Table](https://grafana.com/grafana/plugins/yesoreyeram-boomtable-panel/)
|
||||
|
||||
Latest Version: 1.4.1 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Lack of recent activity in the [project repository](https://github.com/yesoreyeram/yesoreyeram-boomtable-panel) in the past 3 years suggests project _may_ not be actively maintained.
|
||||
|
||||
### [Parity Report](https://grafana.com/grafana/plugins/zuburqan-parity-report-panel/)
|
||||
|
||||
Latest Version: 1.2.2 | Signature: Community | Last Updated: 2021
|
||||
|
||||
> **Warning:** Unknown whether migration to react will be undertaken - [migration issue](https://github.com/zuburqan/grafana-parity-report/issues/17).
|
||||
@@ -62,6 +62,6 @@ Grafana Enterprise includes all of the Grafana OSS APIs as well as those that fo
|
||||
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Data source permissions API]({{< relref "datasource_permissions/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
- [External group sync API]({{< relref "external_group_sync/" >}})
|
||||
- [License API]({{< relref "licensing/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
|
||||
@@ -17,7 +17,7 @@ title: RBAC HTTP API
|
||||
|
||||
# RBAC API
|
||||
|
||||
> Role-based access control API is only available in Grafana Cloud or Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
> Role-based access control API is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
|
||||
The API can be used to create, update, delete, get, and list roles.
|
||||
|
||||
@@ -529,7 +529,7 @@ Content-Type: application/json; charset=UTF-8
|
||||
For example, if a user does not have required permissions for creating users, they won't be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------------ | ------------------------- |
|
||||
| ------------------ | ------------------------- |
|
||||
| users.roles:remove | permissions:type:delegate |
|
||||
|
||||
#### Query parameters
|
||||
|
||||
@@ -57,8 +57,10 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
- **dashboard.id** – id = null to create a new dashboard.
|
||||
- **dashboard.uid** – Optional unique identifier when creating a dashboard. uid = null will generate a new uid.
|
||||
- **folderId** – The id of the folder to save the dashboard in.
|
||||
- **folderUid** – The UID of the folder to save the dashboard in. Overrides the `folderId`.
|
||||
- **overwrite** – Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
|
||||
- **message** - Set a commit message for the version history.
|
||||
- **refresh** - Set the dashboard refresh interval. If this is lower than [the minimum refresh interval]({{< relref "/docs/grafana/latest/setup-grafana/configure-grafana#min_refresh_interval" >}}), then Grafana will ignore it and will enforce the minimum refresh interval.
|
||||
|
||||
For adding or updating an alert rule for a dashboard panel the user should declare a
|
||||
`dashboard.panels.alert` block.
|
||||
@@ -67,36 +69,169 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 78
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 78
|
||||
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
||||
- **200** – Created
|
||||
- **400** – Errors (invalid json, missing or invalid fields, etc)
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
- **412** – Precondition failed
|
||||
|
||||
The **412** status code is used for explaining that you cannot create the dashboard and why.
|
||||
There can be different reasons for this:
|
||||
|
||||
- The dashboard has been changed by someone else, `status=version-mismatch`
|
||||
- A dashboard with the same name in the folder already exists, `status=name-exists`
|
||||
- A dashboard with the same uid already exists, `status=name-exists`
|
||||
- The dashboard belongs to plugin `<plugin title>`, `status=plugin-dashboard`
|
||||
|
||||
- **412** – Precondition failed
|
||||
|
||||
The **412** status code is used for explaining that you cannot create the dashboard and why.
|
||||
There can be different reasons for this:
|
||||
|
||||
- The dashboard has been changed by someone else, `status=version-mismatch`
|
||||
- A dashboard with the same name in the folder already exists, `status=name-exists`
|
||||
- A dashboard with the same uid already exists, `status=name-exists`
|
||||
- The dashboard belongs to plugin `<plugin title>`, `status=plugin-dashboard`
|
||||
|
||||
The response body will have the following properties:
|
||||
|
||||
```http
|
||||
HTTP/1.1 412 Precondition Failed
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 97
|
||||
|
||||
```
|
||||
|
||||
In case of title already exists the `status` property will be `name-exists`.
|
||||
|
||||
## Get dashboard by uid
|
||||
|
||||
`GET /api/dashboards/uid/:uid`
|
||||
|
||||
Will return the dashboard given the dashboard unique identifier (uid). Information about the unique identifier of a folder containing the requested dashboard might be found in the metadata.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#dashboard-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ----------------- | -------------- |
|
||||
| `dashboards:read` | `dashboards:*` |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/dashboards/uid/cIBgcSjkk HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – Found
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
- **404** – Not found
|
||||
|
||||
## Delete dashboard by uid
|
||||
|
||||
`DELETE /api/dashboards/uid/:uid`
|
||||
|
||||
Will delete the dashboard given the specified unique identifier (uid).
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#dashboard-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------------- | ----------------------------- |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`folders:*` |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
DELETE /api/dashboards/uid/cIBgcSjkk HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – Deleted
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
- **404** – Not found
|
||||
|
||||
## Gets the home dashboard
|
||||
|
||||
`GET /api/dashboards/home`
|
||||
|
||||
Will return the home dashboard.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/dashboards/home HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Tags for Dashboard
|
||||
|
||||
`GET /api/dashboards/tags`
|
||||
|
||||
Get all tags of dashboards
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/dashboards/tags HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Dashboard Search
|
||||
|
||||
See [Folder/Dashboard Search API]({{< relref "folder_dashboard_search/" >}}).
|
||||
@@ -108,12 +243,12 @@ Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 78
|
||||
|
||||
{
|
||||
## Get dashboard by uid
|
||||
|
||||
`GET /api/dashboards/uid/:uid`
|
||||
|
||||
Will return the dashboard given the dashboard unique identifier (uid). Information about the unique identifier of a folder containing the requested dashboard might be found in the metadata.
|
||||
|
||||
"id": 1,
|
||||
"uid": "cIBgcSjkk",
|
||||
"url": "/d/cIBgcSjkk/production-overview",
|
||||
"status": "success",
|
||||
"version": 1,
|
||||
"slug": "production-overview" //deprecated in Grafana v5.0
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user