Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac7f9d4598 | ||
|
|
fa4a80ff90 | ||
|
|
126499202e | ||
|
|
c2a9a5f835 | ||
|
|
ea60dda9ce | ||
|
|
80bda7bc58 | ||
|
|
593e73d7b8 | ||
|
|
fdac0ec154 | ||
|
|
0a8cc46e18 | ||
|
|
801fa79c32 |
99
.drone.yml
99
.drone.yml
@@ -24,7 +24,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build verify-drone
|
||||
@@ -74,7 +74,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build verify-starlark .
|
||||
@@ -300,7 +300,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -384,7 +384,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
||||
@@ -418,7 +418,7 @@ steps:
|
||||
- wire-install
|
||||
environment:
|
||||
CGO_ENABLED: "1"
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: lint-backend
|
||||
trigger:
|
||||
event:
|
||||
@@ -474,7 +474,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -522,7 +522,7 @@ steps:
|
||||
$${TEST_TAG}
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
from_secret: github_token_pr
|
||||
TEST_TAG: v0.0.0-test
|
||||
failure: ignore
|
||||
image: grafana/build-container:1.7.5
|
||||
@@ -655,7 +655,7 @@ steps:
|
||||
from_secret: azure_tenant
|
||||
CYPRESS_CI: "true"
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
from_secret: github_token_pr
|
||||
HOST: grafana-server
|
||||
image: us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:latest
|
||||
name: end-to-end-tests-cloud-plugins-suite-azure
|
||||
@@ -765,9 +765,9 @@ steps:
|
||||
- build-docker-images-ubuntu
|
||||
environment:
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
from_secret: docker_password_pr
|
||||
DOCKER_USER:
|
||||
from_secret: docker_username
|
||||
from_secret: docker_username_pr
|
||||
GITHUB_APP_ID:
|
||||
from_secret: delivery-bot-app-id
|
||||
GITHUB_APP_INSTALLATION_ID:
|
||||
@@ -861,7 +861,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
@@ -1028,7 +1028,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build shellcheck
|
||||
@@ -1247,7 +1247,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -1324,7 +1324,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- make gen-go
|
||||
@@ -1338,7 +1338,7 @@ steps:
|
||||
- wire-install
|
||||
environment:
|
||||
CGO_ENABLED: "1"
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: lint-backend
|
||||
- commands:
|
||||
- ./bin/build verify-drone
|
||||
@@ -1392,7 +1392,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -1538,7 +1538,7 @@ steps:
|
||||
from_secret: azure_tenant
|
||||
CYPRESS_CI: "true"
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
from_secret: github_token_pr
|
||||
HOST: grafana-server
|
||||
image: us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:latest
|
||||
name: end-to-end-tests-cloud-plugins-suite-azure
|
||||
@@ -1835,7 +1835,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
@@ -1946,29 +1946,6 @@ steps:
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
- commands:
|
||||
- $$gcpKey = $$env:GCP_KEY
|
||||
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
||||
> gcpkey.json'
|
||||
- dos2unix gcpkey.json
|
||||
- gcloud auth activate-service-account --key-file=gcpkey.json
|
||||
- rm gcpkey.json
|
||||
- cp C:\App\nssm-2.24.zip .
|
||||
- .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER
|
||||
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
||||
- gsutil cp "$$fname" gs://grafana-downloads/oss/main/
|
||||
- gsutil cp "$$fname.sha256" gs://grafana-downloads/oss/main/
|
||||
depends_on:
|
||||
- windows-init
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_grafanauploads_base64
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
PRERELEASE_BUCKET:
|
||||
from_secret: prerelease_bucket
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: build-windows-installer
|
||||
trigger:
|
||||
branch: main
|
||||
event:
|
||||
@@ -2132,7 +2109,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build artifacts docker fetch --edition oss
|
||||
@@ -2228,7 +2205,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build artifacts packages --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
|
||||
@@ -2297,7 +2274,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- yarn install --immutable
|
||||
@@ -2362,7 +2339,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- depends_on:
|
||||
- compile-build-cmd
|
||||
@@ -2450,13 +2427,13 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build whatsnew-checker
|
||||
depends_on:
|
||||
- compile-build-cmd
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: whats-new-checker
|
||||
trigger:
|
||||
event:
|
||||
@@ -2558,7 +2535,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -2759,7 +2736,7 @@ steps:
|
||||
- .\grabpl.exe windows-installer --target gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/grafana-${DRONE_TAG:1}.windows-amd64.zip
|
||||
--edition oss ${DRONE_TAG}
|
||||
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
||||
- gsutil cp "$$fname" gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
|
||||
- gsutil cp $$fname gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
|
||||
- gsutil cp "$$fname.sha256" gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
|
||||
depends_on:
|
||||
- windows-init
|
||||
@@ -2936,7 +2913,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
||||
@@ -3243,7 +3220,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@@ -3930,7 +3907,7 @@ steps:
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana-ci-deploy:1.3.3
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.18.3
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM byrnedo/alpine-curl:0.1.8
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM golang:1.20.10
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM golang:1.20.8
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM plugins/slack
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM postgres:12.3-alpine
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM mysql:5.7.39
|
||||
@@ -3957,7 +3934,7 @@ steps:
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana-ci-deploy:1.3.3
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.18.3
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL byrnedo/alpine-curl:0.1.8
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL golang:1.20.10
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL golang:1.20.8
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL plugins/slack
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL postgres:12.3-alpine
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL mysql:5.7.39
|
||||
@@ -4009,7 +3986,7 @@ steps:
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.20.10
|
||||
image: golang:1.20.8
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build publish grafana-com --edition oss
|
||||
@@ -4163,6 +4140,12 @@ get:
|
||||
kind: secret
|
||||
name: static_asset_editions
|
||||
---
|
||||
get:
|
||||
name: cdn_path
|
||||
path: infra/data/ci/grafana-release-eng/enterprise2
|
||||
kind: secret
|
||||
name: enterprise2-cdn-path
|
||||
---
|
||||
get:
|
||||
name: gcp_service_account_prod_base64
|
||||
path: infra/data/ci/grafana-release-eng/rgm
|
||||
@@ -4181,6 +4164,12 @@ get:
|
||||
kind: secret
|
||||
name: dagger_token
|
||||
---
|
||||
get:
|
||||
name: pat
|
||||
path: infra/data/ci/github/grafanabot
|
||||
kind: secret
|
||||
name: github_token
|
||||
---
|
||||
get:
|
||||
name: app-id
|
||||
path: infra/data/ci/grafana-release-eng/grafana-delivery-bot
|
||||
@@ -4224,6 +4213,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 4d72c6589ce889d528a446d5d09e51aab2a3b8a35cbb1481a32d1af2dd56209b
|
||||
hmac: 5d3e7d409ce35fcc488c40a950583484e2df5ad862a3a84f39042d6e7e63f6ca
|
||||
|
||||
...
|
||||
|
||||
2
.github/workflows/auto-milestone.yml
vendored
2
.github/workflows/auto-milestone.yml
vendored
@@ -2,8 +2,6 @@ name: Auto-milestone
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
|
||||
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.20.10'
|
||||
go-version: '1.20.8'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
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.20.10'
|
||||
go-version: '1.20.8'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
25
CHANGELOG.md
25
CHANGELOG.md
@@ -1,28 +1,3 @@
|
||||
<!-- 9.5.10 START -->
|
||||
|
||||
# 9.5.10 (2023-09-18)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Alpine base image to 3.18.3. [#74995](https://github.com/grafana/grafana/issues/74995), [@zerok](https://github.com/zerok)
|
||||
- **Chore:** Upgrade Go to 1.20.8. [#74982](https://github.com/grafana/grafana/issues/74982), [@zerok](https://github.com/zerok)
|
||||
|
||||
<!-- 9.5.10 END -->
|
||||
<!-- 9.5.9 START -->
|
||||
|
||||
# 9.5.9 (2023-09-05)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **SSE:** DSNode to update result with names to make each value identifiable by labels (only Graphite and TestData). [#73642](https://github.com/grafana/grafana/issues/73642), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Prometheus:** Add present_over_time syntax highlighting. [#72367](https://github.com/grafana/grafana/issues/72367), [@arnaudlemaignen](https://github.com/arnaudlemaignen)
|
||||
- **Alerting:** Improve performance of matching captures. [#71998](https://github.com/grafana/grafana/issues/71998), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **LDAP:** Fix user disabling. [#74096](https://github.com/grafana/grafana/issues/74096), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 9.5.9 END -->
|
||||
<!-- 9.5.8 START -->
|
||||
|
||||
# 9.5.8 (2023-08-16)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ARG BASE_IMAGE=alpine:3.18.3
|
||||
ARG JS_IMAGE=node:18-alpine3.18
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.20.10-alpine3.18
|
||||
ARG GO_IMAGE=golang:1.20.8-alpine3.18
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
2
Makefile
2
Makefile
@@ -192,7 +192,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.10 \
|
||||
--build-arg GO_IMAGE=golang:1.20.8 \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
|
||||
@@ -226,7 +226,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,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>" >}}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -90,7 +90,6 @@ Query expressions can contain references to other variables and in effect create
|
||||
- **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.
|
||||
|
||||
@@ -47,7 +47,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
|
||||
|
||||
|
||||
@@ -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`.
|
||||
|
||||
|
||||
@@ -30,14 +30,14 @@ Returns a list of all library elements the authenticated user has permission to
|
||||
|
||||
Query parameters:
|
||||
|
||||
- `searchString`: Part of the name or description searched for.
|
||||
- `kind`: Kind of element to search for. Use `1` for library panels or `2` for library variables.
|
||||
- `sortDirection`: Sort order of elements. Use `alpha-asc` for ascending and `alpha-desc` for descending sort order.
|
||||
- `typeFilter`: A comma separated list of types to filter the elements by.
|
||||
- `excludeUid`: Element UID to exclude from search results.
|
||||
- `folderFilter`: A comma separated list of folder IDs to filter the elements by.
|
||||
- `perPage`: The number of results per page; default is 100.
|
||||
- `page`: The page for a set of records, given that only `perPage` records are returned at a time. Numbering starts at `1`.
|
||||
- **searchString** – Part of the name or description searched for.
|
||||
- **kind** – Kind of element to search for. Use `1` for library panels or `2` for library variables.
|
||||
- **sortDirection** – Sort order of elements. Use `alpha-asc` for ascending and `alpha-desc` for descending sort order.
|
||||
- **typeFilter** – A comma separated list of types to filter the elements by.
|
||||
- **excludeUid** – Element UID to exclude from search results.
|
||||
- **folderFilter** – A comma separated list of folder ID(s) to filter the elements by.
|
||||
- **perPage** – The number of results per page; default is 100.
|
||||
- **page** – The page for a set of records, given that only `perPage` records are returned at a time. Numbering starts at `1`.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -98,8 +98,8 @@ Content-Type: application/json
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/library-elements/name/API docs Example HTTP/1.1
|
||||
```http
|
||||
GET /api/library-elements/name/API docs Example HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
@@ -157,9 +157,9 @@ Content-Type: application/json
|
||||
JSON Body schema:
|
||||
|
||||
- **folderId** – ID of the folder where the library element is stored. It is deprecated since Grafana v9
|
||||
- `folderUid`: Optional, the UID of the folder where the library element is stored, empty string when it is General folder
|
||||
- `name`: Optional, the name of the library element.
|
||||
- `model`: The JSON model for the library element.
|
||||
- **folderUid** – Optional, the UID of the folder where the library element is stored, empty string when it is General folder
|
||||
- **name** – Optional, the name of the library element.
|
||||
- **model** – The JSON model for the library element.
|
||||
- **kind** – Kind of element to create, Use `1` for library panels or `2` for library variables.
|
||||
- **uid** – Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
|
||||
|
||||
@@ -219,9 +219,9 @@ Content-Type: application/json
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – Updated
|
||||
@@ -265,9 +265,9 @@ Content-Type: application/json
|
||||
- **403** – Access denied
|
||||
- **404** – Library element not found
|
||||
|
||||
- `200`: Found
|
||||
- `401`: Unauthorized
|
||||
- `404`: Library element not found
|
||||
- **200** – Found
|
||||
- **401** – Unauthorized
|
||||
- **404** – Library element not found
|
||||
|
||||
## Create library element
|
||||
|
||||
@@ -277,12 +277,12 @@ Creates a new library element.
|
||||
|
||||
JSON Body schema:
|
||||
|
||||
- `folderId`: ID of the folder where the library element is stored. It is deprecated since Grafana v9
|
||||
- `folderUid`: Optional, the UID of the folder where the library element is stored, empty string when it is General folder
|
||||
- `name`: Optional, the name of the library element.
|
||||
- `model`: The JSON model for the library element.
|
||||
- `kind`: Kind of element to create, Use `1` for library panels or `2` for library variables.
|
||||
- `uid`: Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
|
||||
- **folderId** – ID of the folder where the library element is stored. It is deprecated since Grafana v9
|
||||
- **folderUid** – Optional, the UID of the folder where the library element is stored, empty string when it is General folder
|
||||
- **name** – Optional, the name of the library element.
|
||||
- **model** – The JSON model for the library element.
|
||||
- **kind** – Kind of element to create, Use `1` for library panels or `2` for library variables.
|
||||
- **uid** – Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -343,10 +343,10 @@ Content-Type: application/json
|
||||
|
||||
Status Codes:
|
||||
|
||||
- `200`: Created
|
||||
- `400`: Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
|
||||
- `401`: Unauthorized
|
||||
- `403`: Access denied
|
||||
- **200** – Created
|
||||
- **400** – Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
|
||||
## Update library element
|
||||
|
||||
@@ -356,13 +356,13 @@ Updates an existing library element identified by uid.
|
||||
|
||||
JSON Body schema:
|
||||
|
||||
- `folderId`: ID of the folder where the library element is stored. It is deprecated since Grafana v9
|
||||
- `folderUid`: UID of the folder where the library element is stored, empty string when it is General folder.
|
||||
- `name`: Name of the library element.
|
||||
- `model`: The JSON model for the library element.
|
||||
- `kind`: Kind of element to create. Use `1` for library panels or `2` for library variables.
|
||||
- `version`: Version of the library element you are updating.
|
||||
- `uid`: Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
|
||||
- **folderId** – ID of the folder where the library element is stored. It is deprecated since Grafana v9
|
||||
- **folderUid** – UID of the folder where the library element is stored, empty string when it is General folder.
|
||||
- **name** – Name of the library element.
|
||||
- **model** – The JSON model for the library element.
|
||||
- **kind** – Kind of element to create. Use `1` for library panels or `2` for library variables.
|
||||
- **version** – Version of the library element you are updating.
|
||||
- **uid** – Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -424,12 +424,12 @@ Content-Type: application/json
|
||||
|
||||
Status Codes:
|
||||
|
||||
- `200`: Updated
|
||||
- `400`: Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
|
||||
- `401`: Unauthorized
|
||||
- `403`: Access denied
|
||||
- `404`: Library element not found
|
||||
- `412`: Version mismatch
|
||||
- **200** – Updated
|
||||
- **400** – Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
|
||||
- **401** – Unauthorized
|
||||
- **403** – Access denied
|
||||
- **404** – Library element not found
|
||||
- **412** – Version mismatch
|
||||
|
||||
## Delete library element
|
||||
|
||||
@@ -463,8 +463,8 @@ Content-Type: application/json
|
||||
|
||||
Status Codes:
|
||||
|
||||
- `200`: Deleted
|
||||
- `401`: Unauthorized
|
||||
- `400`: Bad request
|
||||
- `403`: Access denied
|
||||
- `404`: Library element not found
|
||||
- **200** – Deleted
|
||||
- **401** – Unauthorized
|
||||
- **400** – Bad request
|
||||
- **403** – Access denied
|
||||
- **404** – Library element not found
|
||||
|
||||
@@ -38,7 +38,7 @@ A Grafana plugin is software that adds new capabilities to Grafana. They come in
|
||||
|
||||
The data coming into the plugin from the data source might be in many different formats (such as JSON, rows and columns, or CSV), but when it leaves the plugin and moves through the rest of the gates toward a visualization, it's always in data frames.
|
||||
|
||||
Currently, Grafana offers a diverse range of 155 data sources that you can use. The most commonly used options are already pre-installed and accessible. Before exploring other options, look for an existing data source that matches your requirements. Grafana constantly updates the list, but if you don't find a suitable data source, you can browse through the [plugin catalog](/grafana/plugins/?type=datasource) or [create a plugin][create-plugin].
|
||||
Currently, Grafana offers a diverse range of 155 data sources that you can use. The most commonly used options are already pre-installed and accessible. Before exploring other options, look for an existing data source that matches your requirements. Grafana constantly updates the list, but if you don't find a suitable data source, you can browse through the [plugin catalog](/grafana/plugins/?type=datasource) or [create a plugin](/tutorials/build-a-data-source-plugin/).
|
||||
|
||||
## Queries
|
||||
|
||||
@@ -90,9 +90,6 @@ And with the data source identified and the plugin installed, you can write your
|
||||
This component architecture is part of what makes Grafana so powerful and general. Given the data source plugin and data frame abstraction, any data source you can access can work with the same general approach.
|
||||
|
||||
{{% docs/reference %}}
|
||||
[create-plugin]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/create-a-grafana-plugin/"
|
||||
[create-plugin]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/create-a-grafana-plugin/"
|
||||
|
||||
[data-frames]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/data-frames"
|
||||
[data-frames]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/data-frames"
|
||||
|
||||
|
||||
@@ -30,9 +30,7 @@ To see a list of available variables, type `$` in the data link **URL** field to
|
||||
|
||||
> **Note:** These variables changed in 6.4 so if you have an older version of Grafana, then use the version picker to select docs for an older version of Grafana.
|
||||
|
||||
Azure Monitor, [CloudWatch]({{< relref "../../datasources/aws-cloudwatch/query-editor/#deep-link-grafana-panels-to-the-cloudwatch-console-1" >}}), and [Google Cloud Monitoring]({{< relref "../../datasources/google-cloud-monitoring/query-editor/#deep-link-from-grafana-panels-to-the-google-cloud-console-metrics-explorer" >}}) have pre-configured data links called _deep links_.
|
||||
|
||||
You can also use template variables in your data links URLs, refer to [Templates and variables][] for more information on template variables.
|
||||
You can also use template variables in your data links URLs, refer to [Templates and variables]({{< relref "../../dashboards/variables/" >}}) for more information on template variables.
|
||||
|
||||
## Time range panel variables
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ You can configure Grafana to dynamically add panels or rows to a dashboard. A dy
|
||||
|
||||
> **Note:** Repeating panels require variables to have one or more items selected; you cannot repeat a panel zero times to hide it.
|
||||
|
||||
To see an example of repeating panels, refer to [this dashboard with repeating panels](https://play.grafana.org/d/testdata-repeating/testdata-repeating-panels?orgId=1).
|
||||
To see an example of repeating panels, refer to [Prometheus dashboard with repeating panels](https://play.grafana.org/d/000000036/prometheus-repeat).
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
|
||||
@@ -183,5 +183,3 @@ Set a **Soft min** or **soft max** option for better control of Y-axis limits. B
|
||||
**Soft min** and **soft max** settings can prevent blips from turning into mountains when the data is mostly flat, and hard min or max derived from standard min and max field options can prevent intermittent spikes from flattening useful detail by clipping the spikes past a defined point.
|
||||
|
||||
You can set standard min/max options to define hard limits of the Y-axis. For more information, refer to [Standard options definitions]({{< relref "../../configure-standard-options/#max" >}}).
|
||||
|
||||
{{< docs/shared lookup="visualizations/multiple-y-axes.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+2" >}}
|
||||
|
||||
@@ -74,8 +74,6 @@ This setting configures the axis value.
|
||||
|
||||
When selected, the axis appears in reverse order.
|
||||
|
||||
{{< docs/shared lookup="visualizations/multiple-y-axes.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+2" >}}
|
||||
|
||||
## Colors
|
||||
|
||||
The color spectrum controls the mapping between value count (in each bucket) and the color assigned to each bucket. The leftmost color on the spectrum represents the minimum count and the color on the right most side represents the maximum count. Some color schemes are automatically inverted when using the light theme.
|
||||
|
||||
@@ -88,7 +88,7 @@ Gradient mode specifies the gradient fill, which is based on the series color. T
|
||||
- **None:** No gradient fill. This is the default setting.
|
||||
- **Opacity:** An opacity gradient where the opacity of the fill increases as Y-axis values increase.
|
||||
- **Hue:** A subtle gradient that is based on the hue of the series color.
|
||||
- **Scheme:** A color gradient defined by your [Color scheme]({{< relref "../../configure-standard-options/#color-scheme" >}}). This setting is used for the fill area and line. For more information about scheme, refer to [Scheme gradient mode]({{< relref "#scheme-gradient-mode" >}}).
|
||||
- **Scheme:** A color gradient defined by your [Color scheme]({{< relref "../../configure-standard-options/#color-scheme" >}}). This setting is used for the fill area and line. For more information about scheme, refer to [Scheme gradient mode]({{< relref "#cheme-gradient-mode" >}}).
|
||||
|
||||
Gradient appearance is influenced by the **Fill opacity** setting. The following image show, the **Fill opacity** is set to 50.
|
||||
|
||||
@@ -141,7 +141,7 @@ Choose how null values, which are gaps in the data, appear on the graph. Null va
|
||||
|
||||
### Stack series
|
||||
|
||||
_Stacking_ allows Grafana to display series on top of each other. Be cautious when using stacking in the visualization as it can easily create misleading graphs. To read more about why stacking might not be the best approach, refer to [The issue with stacking](https://www.data-to-viz.com/caveat/stacking.html).
|
||||
_Stacking_ allows Grafana to display series on top of each other. Be cautious when using stacking in the visualization as it can easily create misleading graphs. To read more about why stacking might not be the best approach, refer to [Stacked Area Graphs Are Not Your Friend](https://everydayanalytics.ca/2014/08/stacked-area-graphs-are-not-your-friend.html).
|
||||
|
||||

|
||||
|
||||
@@ -224,8 +224,6 @@ Use this option to transform the series values without affecting the values show
|
||||
|
||||
> **Note:** The transform option is only available as an override.
|
||||
|
||||
{{< docs/shared lookup="visualizations/multiple-y-axes.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+2" >}}
|
||||
|
||||
## Color options
|
||||
|
||||
By default, the graph uses the standard [Color scheme]({{< relref "../../configure-standard-options/#color-scheme" >}}) option to assign series colors. You can also use the legend to open the color picker by clicking the legend series color icon. Setting
|
||||
|
||||
@@ -144,8 +144,6 @@ environment variable `HOSTNAME`, if that is empty or does not exist Grafana will
|
||||
|
||||
Force migration will run migrations that might cause data loss. Default is `false`.
|
||||
|
||||
Set force_migration=true in your grafana.ini and restart Grafana to roll back and delete Unified Alerting configuration data. Any alert rules created while using Unified Alerting will be deleted by rolling back.
|
||||
|
||||
<hr />
|
||||
|
||||
## [paths]
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
headless: true
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Back up Grafana
|
||||
---
|
||||
|
||||
# Back up Grafana
|
||||
|
||||
This topic explains how to back up a local Grafana deployment, including configuration, plugin data, and the Grafana database.
|
||||
|
||||
## Back up the Grafana configuration file
|
||||
|
||||
Copy Grafana configuration files that you might have modified in your Grafana deployment to a backup directory.
|
||||
|
||||
The Grafana configuration files are located in the following directories:
|
||||
|
||||
- Default configuration: `$WORKING_DIR/conf/defaults.ini`
|
||||
- Custom configuration: `$WORKING_DIR/conf/custom.ini`
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you installed Grafana using the `deb` or `rpm` packages, then your configuration file is located at
|
||||
`/etc/grafana/grafana.ini`. This path is specified in the Grafana `init.d` script using `--config` file parameter.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Back up plugin data
|
||||
|
||||
Installing plugins in Grafana creates a folder for each plugin with its associated files and data. Copy all files and folders recursively from this location to your backup repository.
|
||||
|
||||
The Grafana plugin files are located in the following directories:
|
||||
|
||||
- Default location for plugins in a binary or source installation: `$WORKING_DIR/data/plugins`
|
||||
- Default location for plugins in a `deb` or `rpm` package: `/var/lib/grafana/plugins`. This path is specified in the Grafana init.d script using `--config` file parameter.
|
||||
|
||||
## Back up the Grafana database
|
||||
|
||||
We recommend that you back up your Grafana database so that you can roll back to a previous version, if required.
|
||||
|
||||
### SQLite
|
||||
|
||||
The default Grafana database is SQLite, which stores its data in a single file on disk. To back up this file, copy it to your backup repository.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
To ensure data integrity, shut down your Grafana service before backing up the SQLite database.
|
||||
{{% /admonition %}}
|
||||
|
||||
The SQLite database file is located in one of the following directories:
|
||||
|
||||
- Default location for SQLite data in a binary or source installation: `$WORKING_DIR/data/grafana.db`
|
||||
- Default location for SQLite data in a `deb` or `rpm` package: `/var/lib/grafana/grafana.db`. This path is specified in the Grafana
|
||||
init.d script using `--config` file parameter.
|
||||
|
||||
### MySQL
|
||||
|
||||
To back up or restore a MySQL Grafana database, run the following commands:
|
||||
|
||||
```bash
|
||||
backup:
|
||||
> mysqldump -u root -p[root_password] [grafana] > grafana_backup.sql
|
||||
|
||||
restore:
|
||||
> mysql -u root -p grafana < grafana_backup.sql
|
||||
```
|
||||
|
||||
### Postgres
|
||||
|
||||
To back up or restore a Postgres Grafana database, run the following commands:
|
||||
|
||||
```bash
|
||||
backup:
|
||||
> pg_dump grafana > grafana_backup
|
||||
|
||||
restore:
|
||||
> psql grafana < grafana_backup
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
headless: true
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Upgrade guide introduction
|
||||
---
|
||||
|
||||
We recommend that you upgrade Grafana often to stay current with the latest fixes and enhancements.
|
||||
Because Grafana upgrades are backward compatible, the upgrade process is straightforward, and dashboards and graphs will not change.
|
||||
|
||||
In addition to common tasks you should complete for all versions of Grafana, there might be additional upgrade tasks to complete for a version.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
There might be breaking changes in some releases. We outline these changes in the [What's New ]({{< relref "../../whatsnew/" >}}) document for most releases or a separate [Breaking changes]({{< relref "../../breaking-changes/" >}}) document for releases with many breaking changes.
|
||||
{{% /admonition %}}
|
||||
|
||||
For versions of Grafana prior to v9.2, we published additional information in the [Release Notes]({{< relref "../../release-notes/" >}}).
|
||||
|
||||
When available, we list all changes with links to pull requests or issues in the [Changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
When possible, we recommend that you test the Grafana upgrade process in a test or development environment.
|
||||
{{% /admonition %}}
|
||||
@@ -1,11 +1,59 @@
|
||||
---
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Upgrade guide common tasks
|
||||
---
|
||||
|
||||
We recommend that you upgrade Grafana often to stay current with the latest fixes and enhancements.
|
||||
Because Grafana upgrades are backward compatible, the upgrade process is straightforward, and dashboards and graphs will not change.
|
||||
|
||||
In addition to common tasks you should complete for all versions of Grafana, there might be additional upgrade tasks to complete for a version.
|
||||
|
||||
> **Note:** There might be minor breaking changes in some releases. We outline these changes in the [What's New ]({{< relref "../../whatsnew/" >}}) document for each release.
|
||||
|
||||
For versions of Grafana prior to v9.2, we published additional information in the [Release Notes]({{< relref "../../release-notes/" >}}).
|
||||
|
||||
When available, we list all changes with links to pull requests or issues in the [Changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md).
|
||||
|
||||
> **Note:** When possible, we recommend that you test the Grafana upgrade process in a test or development environment.
|
||||
|
||||
## Back up the Grafana database
|
||||
|
||||
Although Grafana automatically upgrades the database on startup, we recommend that you back up your Grafana database so that you can roll back to a previous version, if required.
|
||||
|
||||
### SQLite
|
||||
|
||||
If you use SQLite, you only need to back up the `grafana.db` file. On Unix systems, the database file is usually located in `/var/lib/grafana/`.
|
||||
|
||||
If you are unsure which database you use and where it is stored, check the Grafana configuration file. If you
|
||||
installed Grafana to a custom location using a binary tar/zip, the database is usually located in `<grafana_install_dir>/data`.
|
||||
|
||||
### MySQL
|
||||
|
||||
To back up or restore a MySQL Grafana database, run the following commands:
|
||||
|
||||
```bash
|
||||
backup:
|
||||
> mysqldump -u root -p[root_password] [grafana] > grafana_backup.sql
|
||||
|
||||
restore:
|
||||
> mysql -u root -p grafana < grafana_backup.sql
|
||||
```
|
||||
|
||||
### Postgres
|
||||
|
||||
To back up or restore a Postgres Grafana database, run the following commands:
|
||||
|
||||
```bash
|
||||
backup:
|
||||
> pg_dump grafana > grafana_backup
|
||||
|
||||
restore:
|
||||
> psql grafana < grafana_backup
|
||||
```
|
||||
|
||||
## Backup plugins
|
||||
|
||||
We recommend that you back up installed plugins before you upgrade Grafana so that you can roll back to a previous version of Grafana, if necessary.
|
||||
|
||||
## Upgrade Grafana
|
||||
|
||||
The following sections provide instructions for how to upgrade Grafana based on your installation method.
|
||||
@@ -90,9 +138,7 @@ To upgrade Grafana running in a Docker container, complete the following steps:
|
||||
|
||||
1. Run a commands similar to the following commands.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
This is an example. The parameters you enter depend on how you configured your Grafana container.
|
||||
{{% /admonition %}}
|
||||
> **Note:** This is an example. The parameters you enter depend on how you configured your Grafana container.
|
||||
|
||||
```bash
|
||||
docker pull grafana/grafana
|
||||
@@ -137,5 +183,5 @@ can make older plugins stop working properly.
|
||||
Run the following command to update plugins:
|
||||
|
||||
```bash
|
||||
grafana cli plugins update-all
|
||||
grafana-cli plugins update-all
|
||||
```
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Display multiple y-axes
|
||||
---
|
||||
|
||||
# Display multiple y-axes
|
||||
|
||||
In some cases, you may want to display multiple y-axes. For example, if you have a dataset showing both temperature and humidity over time, you may want to show two y-axes with different units for these two series.
|
||||
|
||||
You can do this by [adding field overrides]({{< relref "../../panels-visualizations/configure-overrides#add-a-field-override" >}}). Follow the steps as many times as required to add as many y-axes as you need.
|
||||
@@ -12,10 +12,6 @@ weight: 2900
|
||||
|
||||
# Upgrade to Grafana v8.0
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2800
|
||||
|
||||
# Upgrade to Grafana v8.1
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2700
|
||||
|
||||
# Upgrade to Grafana v8.2
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2600
|
||||
|
||||
# Upgrade to Grafana v8.3
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2500
|
||||
|
||||
# Upgrade to Grafana v8.4
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2400
|
||||
|
||||
# Upgrade to Grafana v8.5
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2300
|
||||
|
||||
# Upgrade to Grafana v9.0
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2200
|
||||
|
||||
# Upgrade to Grafana v9.1
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2100
|
||||
|
||||
# Upgrade to Grafana v9.2
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 2000
|
||||
|
||||
# Upgrade to Grafana v9.3
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 1995
|
||||
|
||||
# Upgrade to Grafana v9.4
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -12,10 +12,6 @@ weight: 1800
|
||||
|
||||
# Upgrade to Grafana v9.5
|
||||
|
||||
{{< docs/shared lookup="upgrade/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared lookup="back-up/back-up-grafana.md" source="grafana" version="<GRAFANA VERSION>" leveloffset="+1" >}}
|
||||
|
||||
{{< docs/shared lookup="upgrade/upgrade-common-tasks.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Technical notes
|
||||
|
||||
@@ -79,7 +79,7 @@ Traditionally alerts in the Alert Panel were grouped by the alert rule that crea
|
||||
|
||||
### WeCom contact point
|
||||
|
||||
Starting with Grafana 8.4, you can configure [a WeCom contact point]({{< relref "../alerting/fundamentals/contact-points" >}}), to send alert notifications to WeCom.
|
||||
Starting with Grafana 8.4, you can [configure a WeCom](https://grafana.com/docs/grafana/next/alerting/unified-alerting/contact-points/#wecom) contact point, to send alert notifications to WeCom.
|
||||
|
||||
## New panel options
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ In order to support debugging issues in Grafana, error alerts that appear when v
|
||||
|
||||
## Service accounts (beta)
|
||||
|
||||
Service accounts are a major evolution for machine access within Grafana. You can create multiple API tokens per service account with independent expiration dates, and temporarily disable a service account without deleting it. These benefits make Service Accounts a more flexible way for Terraform and other apps to authenticate with Grafana. Service accounts also work with [fine-grained access control](https://grafana.com/docs/grafana/latest/enterprise/access-control/) in [Grafana Enterprise](https://grafana.com/docs/grafana/latest/enterprise/): you can improve security by granting service accounts specific roles to limit the functions they can perform. Service accounts are available in beta; you can try them out by enabling the `service-accounts` feature toggle or, if you use Grafana Cloud, [reaching out to our support team](https://grafana.com/orgs/raintank/tickets#) for early access. Learn more about Service Accounts in our [docs](https://grafana.com/docs/grafana/latest/administration/service-accounts).
|
||||
Service accounts are a major evolution for machine access within Grafana. You can create multiple API tokens per service account with independent expiration dates, and temporarily disable a service account without deleting it. These benefits make Service Accounts a more flexible way for Terraform and other apps to authenticate with Grafana. Service accounts also work with [fine-grained access control](https://grafana.com/docs/grafana/latest/enterprise/access-control/) in [Grafana Enterprise](https://grafana.com/docs/grafana/latest/enterprise/): you can improve security by granting service accounts specific roles to limit the functions they can perform. Service accounts are available in beta; you can try them out by enabling the `service-accounts` [feature toggle](https://grafana.com/docs/grafana/latest/administration/service-accounts/enable-service-accounts) or, if you use Grafana Cloud, [reaching out to our support team](https://grafana.com/orgs/raintank/tickets#) for early access. Learn more about Service Accounts in our [docs](https://grafana.com/docs/grafana/latest/administration/service-accounts).
|
||||
|
||||
{{< figure src="/static/img/docs/service-accounts/configure-8-5.png" max-width="400px" caption="Configure service accounts" >}}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ The new heatmap by default assumes that the data is pre-bucketed. So if your que
|
||||
|
||||
Grafana Alerting is now on by default if you upgrade from an earlier version of Grafana. If you have been using legacy alerting in an earlier version of Grafana and you upgrade to Grafana 9 your alert rules will be automatically migrated and the legacy alerting interface will be replaced by the Grafana Alerting interface.
|
||||
|
||||
Grafana Alerting, called unified alerting in Grafana 8, has been available since June, 2021 now provides feature parity with legacy alerting and many additional benefits. To find out more on the process to revert back to legacy alerts if needed, click [here]({{< relref "../alerting/migrating-alerts/opt-out" >}}). Note that if you do revert back (by setting the Grafana config flag GF_UNIFIED_ALERTING_ENABLED to false), that we expect to remove legacy alerting in the next major Grafana release, Grafana 10.
|
||||
Grafana Alerting, called unified alerting in Grafana 8, has been available since June, 2021 now provides feature parity with legacy alerting and many additional benefits. To find out more on the process to revert back to legacy alerts if needed, click [here]({{< relref "../alerting/migrating-alerts/opt-out/" >}}). Note that if you do revert back (by setting the Grafana config flag GF_UNIFIED_ALERTING_ENABLED to false), that we expect to remove legacy alerting in the next major Grafana release, Grafana 10.
|
||||
|
||||
### Alert state history for Grafana managed alerts
|
||||
|
||||
|
||||
@@ -7,3 +7,5 @@ export DOC_VALIDATOR_IMAGE := $(shell sed -En 's, *image: "(grafana/doc-validato
|
||||
# Skip some doc-validator checks.
|
||||
export DOC_VALIDATOR_SKIP_CHECKS := ^(?:image.+|canonical-does-not-match-pretty-URL)$
|
||||
|
||||
# Use alternative image until make-docs 3.0.0 is rolled out.
|
||||
export DOCS_IMAGE := grafana/docs-base:dbd975af06
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"packages": ["packages/*"],
|
||||
"version": "9.5.13"
|
||||
"version": "9.5.12"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"license": "AGPL-3.0-only",
|
||||
"private": true,
|
||||
"name": "grafana",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"repository": "github:grafana/grafana",
|
||||
"scripts": {
|
||||
"build": "yarn i18n:compile && NODE_ENV=production webpack --progress --config scripts/webpack/webpack.prod.js",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/data",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana Data Library",
|
||||
"keywords": [
|
||||
"typescript"
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@braintree/sanitize-url": "6.0.2",
|
||||
"@grafana/schema": "9.5.13",
|
||||
"@grafana/schema": "9.5.12",
|
||||
"@types/d3-interpolate": "^3.0.0",
|
||||
"d3-interpolate": "3.0.1",
|
||||
"date-fns": "2.29.3",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/e2e-selectors",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana End-to-End Test Selectors Library",
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/e2e",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana End-to-End Test Library",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@@ -63,7 +63,7 @@
|
||||
"@babel/core": "7.20.5",
|
||||
"@babel/preset-env": "7.20.2",
|
||||
"@cypress/webpack-preprocessor": "5.17.0",
|
||||
"@grafana/e2e-selectors": "9.5.13",
|
||||
"@grafana/e2e-selectors": "9.5.12",
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"@mochajs/json-file-reporter": "^1.2.0",
|
||||
"babel-loader": "9.1.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@grafana/eslint-plugin",
|
||||
"description": "ESLint rules for use within the Grafana repo. Not suitable (or supported) for external use.",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"main": "./index.cjs",
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/runtime",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana Runtime Library",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -37,10 +37,10 @@
|
||||
"postpack": "mv package.json.bak package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grafana/data": "9.5.13",
|
||||
"@grafana/e2e-selectors": "9.5.13",
|
||||
"@grafana/data": "9.5.12",
|
||||
"@grafana/e2e-selectors": "9.5.12",
|
||||
"@grafana/faro-web-sdk": "1.0.2",
|
||||
"@grafana/ui": "9.5.13",
|
||||
"@grafana/ui": "9.5.12",
|
||||
"@sentry/browser": "6.19.7",
|
||||
"history": "4.10.1",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/schema",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana Schema Library",
|
||||
"keywords": [
|
||||
"typescript"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/toolkit",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana Toolkit",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -51,10 +51,10 @@
|
||||
"@babel/preset-env": "7.18.9",
|
||||
"@babel/preset-react": "7.18.6",
|
||||
"@babel/preset-typescript": "7.18.6",
|
||||
"@grafana/data": "9.5.13",
|
||||
"@grafana/data": "9.5.12",
|
||||
"@grafana/eslint-config": "5.1.0",
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"@grafana/ui": "9.5.13",
|
||||
"@grafana/ui": "9.5.12",
|
||||
"@jest/core": "27.5.1",
|
||||
"@types/command-exists": "^1.2.0",
|
||||
"@types/eslint": "8.4.1",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/ui",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Grafana Components Library",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -49,10 +49,10 @@
|
||||
"dependencies": {
|
||||
"@emotion/css": "11.10.6",
|
||||
"@emotion/react": "11.10.6",
|
||||
"@grafana/data": "9.5.13",
|
||||
"@grafana/e2e-selectors": "9.5.13",
|
||||
"@grafana/data": "9.5.12",
|
||||
"@grafana/e2e-selectors": "9.5.12",
|
||||
"@grafana/faro-web-sdk": "1.0.2",
|
||||
"@grafana/schema": "9.5.13",
|
||||
"@grafana/schema": "9.5.12",
|
||||
"@leeoniya/ufuzzy": "1.0.6",
|
||||
"@monaco-editor/react": "4.4.6",
|
||||
"@popperjs/core": "2.11.6",
|
||||
|
||||
@@ -772,7 +772,7 @@ func realPackageVariant(ctx context.Context, v config.Variant, edition config.Ed
|
||||
systemdFileSrc: filepath.Join(grafanaDir, "packaging", "rpm", "systemd", "grafana-server.service"),
|
||||
wrapperFilePath: filepath.Join(grafanaDir, "packaging", "wrappers"),
|
||||
// chkconfig is depended on since our systemd service wraps a SysV init script, and that requires chkconfig
|
||||
depends: []string{"/sbin/service", "chkconfig", "fontconfig", "freetype"},
|
||||
depends: []string{"/sbin/service", "chkconfig", "fontconfig", "freetype", "urw-fonts"},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -314,11 +314,7 @@ func (dn *DSNode) Execute(ctx context.Context, now time.Time, _ mathexp.Vars, s
|
||||
|
||||
if len(filtered) == 0 {
|
||||
responseType = "no data"
|
||||
noData := mathexp.NewNoData()
|
||||
if len(response.Frames) > 0 {
|
||||
noData.Frame = response.Frames[0]
|
||||
}
|
||||
return mathexp.Results{Values: mathexp.Values{noData}}, nil
|
||||
return mathexp.Results{Values: mathexp.Values{mathexp.NoData{Frame: response.Frames[0]}}}, nil
|
||||
}
|
||||
|
||||
maybeFixerFn := checkIfSeriesNeedToBeFixed(filtered, dataSource)
|
||||
|
||||
@@ -201,11 +201,6 @@ func TestConvertDataFramesToResults(t *testing.T) {
|
||||
return dsNode.Execute(context.Background(), time.Now(), nil, s)
|
||||
}
|
||||
|
||||
t.Run("should return NoData if no frames", func(t *testing.T) {
|
||||
result, err := execute(nil, "test")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, mathexp.NewNoData(), result.Values[0].Value())
|
||||
})
|
||||
t.Run("should add name label if no labels and specific data source", func(t *testing.T) {
|
||||
supported := []string{datasources.DS_GRAPHITE, datasources.DS_TESTDATA}
|
||||
t.Run("when only field name is specified", func(t *testing.T) {
|
||||
|
||||
@@ -6,4 +6,4 @@ import (
|
||||
)
|
||||
|
||||
// PluginFactoryFunc is a function type for creating a Plugin.
|
||||
type PluginFactoryFunc func(pluginID string, logger log.Logger, env func() []string) (Plugin, error)
|
||||
type PluginFactoryFunc func(pluginID string, logger log.Logger, env []string) (Plugin, error)
|
||||
|
||||
@@ -21,7 +21,7 @@ type corePlugin struct {
|
||||
|
||||
// New returns a new backendplugin.PluginFactoryFunc for creating a core (built-in) backendplugin.Plugin.
|
||||
func New(opts backend.ServeOpts) backendplugin.PluginFactoryFunc {
|
||||
return func(pluginID string, logger log.Logger, _ func() []string) (backendplugin.Plugin, error) {
|
||||
return func(pluginID string, logger log.Logger, env []string) (backendplugin.Plugin, error) {
|
||||
return &corePlugin{
|
||||
pluginID: pluginID,
|
||||
logger: logger,
|
||||
|
||||
@@ -33,12 +33,12 @@ type grpcPlugin struct {
|
||||
|
||||
// newPlugin allocates and returns a new gRPC (external) backendplugin.Plugin.
|
||||
func newPlugin(descriptor PluginDescriptor) backendplugin.PluginFactoryFunc {
|
||||
return func(pluginID string, logger log.Logger, env func() []string) (backendplugin.Plugin, error) {
|
||||
return func(pluginID string, logger log.Logger, env []string) (backendplugin.Plugin, error) {
|
||||
return &grpcPlugin{
|
||||
descriptor: descriptor,
|
||||
logger: logger,
|
||||
clientFactory: func() *plugin.Client {
|
||||
return plugin.NewClient(newClientConfig(descriptor.executablePath, env(), logger, descriptor.versionedPlugins))
|
||||
return plugin.NewClient(newClientConfig(descriptor.executablePath, env, logger, descriptor.versionedPlugins))
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ func NewFakeBackendProcessProvider() *FakeBackendProcessProvider {
|
||||
|
||||
func (pr *FakeBackendProcessProvider) BackendFactory(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc {
|
||||
pr.Requested[p.ID]++
|
||||
return func(pluginID string, _ log.Logger, _ func() []string) (backendplugin.Plugin, error) {
|
||||
return func(pluginID string, _ log.Logger, _ []string) (backendplugin.Plugin, error) {
|
||||
pr.Invoked[pluginID]++
|
||||
return &FakePluginClient{}, nil
|
||||
}
|
||||
|
||||
@@ -37,10 +37,7 @@ func (i *Initializer) Initialize(ctx context.Context, p *plugins.Plugin) error {
|
||||
return fmt.Errorf("could not find backend factory for plugin")
|
||||
}
|
||||
|
||||
// this will ensure that the env variables are calculated every time a plugin is started
|
||||
envFunc := func() []string { return i.envVars(p) }
|
||||
|
||||
if backendClient, err := backendFactory(p.ID, p.Logger(), envFunc); err != nil {
|
||||
if backendClient, err := backendFactory(p.ID, p.Logger(), i.envVars(p)); err != nil {
|
||||
return err
|
||||
} else {
|
||||
p.RegisterClient(backendClient)
|
||||
|
||||
@@ -422,7 +422,7 @@ type fakeBackendProvider struct {
|
||||
}
|
||||
|
||||
func (f *fakeBackendProvider) BackendFactory(_ context.Context, _ *plugins.Plugin) backendplugin.PluginFactoryFunc {
|
||||
return func(_ string, _ log.Logger, _ func() []string) (backendplugin.Plugin, error) {
|
||||
return func(_ string, _ log.Logger, _ []string) (backendplugin.Plugin, error) {
|
||||
return f.plugin, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ func (s *AccessControlStore) SearchUsersPermissions(ctx context.Context, orgID i
|
||||
INNER JOIN team_role AS tr ON tr.role_id = p.role_id
|
||||
INNER JOIN team_member AS tm ON tm.team_id = tr.team_id
|
||||
UNION ALL
|
||||
SELECT ou.user_id, ou.org_id, p.action, p.scope
|
||||
SELECT ou.user_id, br.org_id, p.action, p.scope
|
||||
FROM permission AS p
|
||||
INNER JOIN builtin_role AS br ON br.role_id = p.role_id
|
||||
INNER JOIN org_user AS ou ON ou.role = br.role
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package querydata
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/querydata/exemplar"
|
||||
)
|
||||
|
||||
func TestQueryData_parseResponse(t *testing.T) {
|
||||
qd := QueryData{exemplarSampler: exemplar.NewStandardDeviationSampler}
|
||||
|
||||
t.Run("resultType is before result the field must parsed normally", func(t *testing.T) {
|
||||
resBody := `{"data":{"resultType":"vector", "result":[{"metric":{"__name__":"some_name","environment":"some_env","id":"some_id","instance":"some_instance:1234","job":"some_job","name":"another_name","region":"some_region"},"value":[1.1,"2"]}]},"status":"success"}`
|
||||
res := &http.Response{Body: io.NopCloser(bytes.NewBufferString(resBody))}
|
||||
result := qd.parseResponse(context.Background(), &models.Query{}, res)
|
||||
assert.Nil(t, result.Error)
|
||||
assert.Len(t, result.Frames, 1)
|
||||
})
|
||||
|
||||
t.Run("resultType is after the result field must parsed normally", func(t *testing.T) {
|
||||
resBody := `{"data":{"result":[{"metric":{"__name__":"some_name","environment":"some_env","id":"some_id","instance":"some_instance:1234","job":"some_job","name":"another_name","region":"some_region"},"value":[1.1,"2"]}],"resultType":"vector"},"status":"success"}`
|
||||
res := &http.Response{Body: io.NopCloser(bytes.NewBufferString(resBody))}
|
||||
result := qd.parseResponse(context.Background(), &models.Query{}, res)
|
||||
assert.Nil(t, result.Error)
|
||||
assert.Len(t, result.Frames, 1)
|
||||
})
|
||||
|
||||
t.Run("no resultType is existed in the data", func(t *testing.T) {
|
||||
resBody := `{"data":{"result":[{"metric":{"__name__":"some_name","environment":"some_env","id":"some_id","instance":"some_instance:1234","job":"some_job","name":"another_name","region":"some_region"},"value":[1.1,"2"]}]},"status":"success"}`
|
||||
res := &http.Response{Body: io.NopCloser(bytes.NewBufferString(resBody))}
|
||||
result := qd.parseResponse(context.Background(), &models.Query{}, res)
|
||||
assert.Nil(t, result.Frames[0].Fields)
|
||||
})
|
||||
|
||||
t.Run("resultType is set as empty string before result", func(t *testing.T) {
|
||||
resBody := `{"data":{"resultType":"", "result":[{"metric":{"__name__":"some_name","environment":"some_env","id":"some_id","instance":"some_instance:1234","job":"some_job","name":"another_name","region":"some_region"},"value":[1.1,"2"]}]},"status":"success"}`
|
||||
res := &http.Response{Body: io.NopCloser(bytes.NewBufferString(resBody))}
|
||||
result := qd.parseResponse(context.Background(), &models.Query{}, res)
|
||||
assert.Error(t, result.Error)
|
||||
assert.Equal(t, result.Error.Error(), "unknown result type: ")
|
||||
})
|
||||
|
||||
t.Run("resultType is set as empty string after result", func(t *testing.T) {
|
||||
resBody := `{"data":{"result":[{"metric":{"__name__":"some_name","environment":"some_env","id":"some_id","instance":"some_instance:1234","job":"some_job","name":"another_name","region":"some_region"},"value":[1.1,"2"]}],"resultType":""},"status":"success"}`
|
||||
res := &http.Response{Body: io.NopCloser(bytes.NewBufferString(resBody))}
|
||||
result := qd.parseResponse(context.Background(), &models.Query{}, res)
|
||||
assert.Error(t, result.Error)
|
||||
assert.Equal(t, result.Error.Error(), "unknown result type: ")
|
||||
})
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
// Package jsonitere wraps json-iterator/go's Iterator methods with error returns
|
||||
// so linting can catch unchecked errors.
|
||||
// The underlying iterator's Error property is returned and not reset.
|
||||
// See json-iterator/go for method documentation and additional methods that
|
||||
// can be added to this library.
|
||||
package jsonitere
|
||||
|
||||
import (
|
||||
j "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
// named property instead of embedded so there is no
|
||||
// confusion about which method or property is called
|
||||
i *j.Iterator
|
||||
}
|
||||
|
||||
func NewIterator(i *j.Iterator) *Iterator {
|
||||
return &Iterator{i}
|
||||
}
|
||||
|
||||
func (iter *Iterator) Read() (any, error) {
|
||||
return iter.i.Read(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadAny() (j.Any, error) {
|
||||
return iter.i.ReadAny(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadArray() (bool, error) {
|
||||
return iter.i.ReadArray(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadObject() (string, error) {
|
||||
return iter.i.ReadObject(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadString() (string, error) {
|
||||
return iter.i.ReadString(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) WhatIsNext() (j.ValueType, error) {
|
||||
return iter.i.WhatIsNext(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) Skip() error {
|
||||
iter.i.Skip()
|
||||
return iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) SkipAndReturnBytes() []byte {
|
||||
return iter.i.SkipAndReturnBytes()
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadVal(obj any) error {
|
||||
iter.i.ReadVal(obj)
|
||||
return iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadFloat64() (float64, error) {
|
||||
return iter.i.ReadFloat64(), iter.i.Error
|
||||
}
|
||||
|
||||
func (iter *Iterator) ReadInt8() (int8, error) {
|
||||
return iter.i.ReadInt8(), iter.i.Error
|
||||
}
|
||||
@@ -106,30 +106,37 @@ func readPrometheusData(iter *jsoniter.Iterator, opt Options) backend.DataRespon
|
||||
|
||||
resultType := ""
|
||||
var rsp backend.DataResponse
|
||||
resultTypeFound := false
|
||||
var resultBytes []byte
|
||||
|
||||
for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() {
|
||||
switch l1Field {
|
||||
case "resultType":
|
||||
resultType = iter.ReadString()
|
||||
resultTypeFound = true
|
||||
|
||||
// if we have saved resultBytes we will parse them here
|
||||
// we saved them because when we had them we don't know the resultType
|
||||
if len(resultBytes) > 0 {
|
||||
ji := jsoniter.ParseBytes(jsoniter.ConfigDefault, resultBytes)
|
||||
rsp = readResult(resultType, rsp, ji, opt)
|
||||
}
|
||||
|
||||
case "result":
|
||||
// for some rare cases resultType is coming after the result.
|
||||
// when that happens we save the bytes and parse them after reading resultType
|
||||
// see: https://github.com/grafana/grafana/issues/64693
|
||||
if resultTypeFound {
|
||||
rsp = readResult(resultType, rsp, iter, opt)
|
||||
} else {
|
||||
resultBytes = iter.SkipAndReturnBytes()
|
||||
switch resultType {
|
||||
case "matrix":
|
||||
if opt.MatrixWideSeries {
|
||||
rsp = readMatrixOrVectorWide(iter, resultType, opt)
|
||||
} else {
|
||||
rsp = readMatrixOrVectorMulti(iter, resultType, opt)
|
||||
}
|
||||
case "vector":
|
||||
if opt.VectorWideSeries {
|
||||
rsp = readMatrixOrVectorWide(iter, resultType, opt)
|
||||
} else {
|
||||
rsp = readMatrixOrVectorMulti(iter, resultType, opt)
|
||||
}
|
||||
case "streams":
|
||||
rsp = readStream(iter)
|
||||
case "string":
|
||||
rsp = readString(iter)
|
||||
case "scalar":
|
||||
rsp = readScalar(iter)
|
||||
default:
|
||||
iter.Skip()
|
||||
rsp = backend.DataResponse{
|
||||
Error: fmt.Errorf("unknown result type: %s", resultType),
|
||||
}
|
||||
}
|
||||
|
||||
case "stats":
|
||||
@@ -150,36 +157,7 @@ func readPrometheusData(iter *jsoniter.Iterator, opt Options) backend.DataRespon
|
||||
logf("[data] TODO, support key: %s / %v\n", l1Field, v)
|
||||
}
|
||||
}
|
||||
return rsp
|
||||
}
|
||||
|
||||
// will read the result object based on the resultType and return a DataResponse
|
||||
func readResult(resultType string, rsp backend.DataResponse, iter *jsoniter.Iterator, opt Options) backend.DataResponse {
|
||||
switch resultType {
|
||||
case "matrix":
|
||||
if opt.MatrixWideSeries {
|
||||
rsp = readMatrixOrVectorWide(iter, resultType, opt)
|
||||
} else {
|
||||
rsp = readMatrixOrVectorMulti(iter, resultType, opt)
|
||||
}
|
||||
case "vector":
|
||||
if opt.VectorWideSeries {
|
||||
rsp = readMatrixOrVectorWide(iter, resultType, opt)
|
||||
} else {
|
||||
rsp = readMatrixOrVectorMulti(iter, resultType, opt)
|
||||
}
|
||||
case "streams":
|
||||
rsp = readStream(iter)
|
||||
case "string":
|
||||
rsp = readString(iter)
|
||||
case "scalar":
|
||||
rsp = readScalar(iter)
|
||||
default:
|
||||
iter.Skip()
|
||||
rsp = backend.DataResponse{
|
||||
Error: fmt.Errorf("unknown result type: %s", resultType),
|
||||
}
|
||||
}
|
||||
return rsp
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@grafana-plugins/input-datasource",
|
||||
"version": "9.5.13",
|
||||
"version": "9.5.12",
|
||||
"description": "Input Datasource",
|
||||
"private": true,
|
||||
"repository": {
|
||||
@@ -15,15 +15,15 @@
|
||||
},
|
||||
"author": "Grafana Labs",
|
||||
"devDependencies": {
|
||||
"@grafana/toolkit": "9.5.13",
|
||||
"@grafana/toolkit": "9.5.12",
|
||||
"@types/jest": "26.0.15",
|
||||
"@types/lodash": "4.14.149",
|
||||
"@types/react": "17.0.30",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grafana/data": "9.5.13",
|
||||
"@grafana/ui": "9.5.13",
|
||||
"@grafana/data": "9.5.12",
|
||||
"@grafana/ui": "9.5.12",
|
||||
"jquery": "3.5.1",
|
||||
"react": "17.0.1",
|
||||
"react-dom": "17.0.1",
|
||||
|
||||
@@ -80,7 +80,6 @@ import { preloadPlugins } from './features/plugins/pluginPreloader';
|
||||
import { QueryRunner } from './features/query/state/QueryRunner';
|
||||
import { runRequest } from './features/query/state/runRequest';
|
||||
import { initWindowRuntime } from './features/runtime/init';
|
||||
import { cleanupOldExpandedFolders } from './features/search/utils';
|
||||
import { variableAdapters } from './features/variables/adapters';
|
||||
import { createAdHocVariableAdapter } from './features/variables/adhoc/adapter';
|
||||
import { createConstantVariableAdapter } from './features/variables/constant/adapter';
|
||||
@@ -202,13 +201,6 @@ export class GrafanaApp {
|
||||
// Read initial kiosk mode from url at app startup
|
||||
chromeService.setKioskModeFromUrl(queryParams.kiosk);
|
||||
|
||||
// Clean up old search local storage values
|
||||
try {
|
||||
cleanupOldExpandedFolders();
|
||||
} catch (err) {
|
||||
console.warn('Failed to clean up old expanded folders', err);
|
||||
}
|
||||
|
||||
this.context = {
|
||||
backend: backendSrv,
|
||||
location: locationService,
|
||||
|
||||
@@ -49,7 +49,7 @@ export const RolePicker = ({
|
||||
useEffect(() => {
|
||||
setSelectedBuiltInRole(basicRole);
|
||||
setSelectedRoles(appliedRoles);
|
||||
}, [appliedRoles, basicRole, onBasicRoleChange]);
|
||||
}, [appliedRoles, basicRole]);
|
||||
|
||||
useEffect(() => {
|
||||
const dimensions = ref?.current?.getBoundingClientRect();
|
||||
|
||||
@@ -176,13 +176,13 @@ export class DashboardModel implements TimeModel {
|
||||
|
||||
// Auto-migrate old angular panels
|
||||
if (options?.autoMigrateOldPanels || !config.angularSupportEnabled || config.featureToggles.autoMigrateOldPanels) {
|
||||
for (const p of this.panelIterator()) {
|
||||
this.panels.forEach((p) => {
|
||||
const newType = autoMigrateAngular[p.type];
|
||||
if (!p.autoMigrateFrom && newType) {
|
||||
p.autoMigrateFrom = p.type;
|
||||
p.type = newType;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.addBuiltInAnnotationQuery();
|
||||
|
||||
@@ -6,7 +6,6 @@ export const SEARCH_ITEM_HEIGHT = 58;
|
||||
export const SEARCH_ITEM_MARGIN = 8;
|
||||
export const DEFAULT_SORT = { label: 'A\u2013Z', value: 'alpha-asc' };
|
||||
export const SECTION_STORAGE_KEY = 'search.sections';
|
||||
export const SEARCH_EXPANDED_FOLDER_STORAGE_KEY = 'grafana.search.expanded-folder';
|
||||
export const GENERAL_FOLDER_ID = 0;
|
||||
export const GENERAL_FOLDER_UID = 'general';
|
||||
export const GENERAL_FOLDER_TITLE = 'General';
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { css } from '@emotion/css';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import React, { useCallback } from 'react';
|
||||
import { useAsync, useLocalStorage } from 'react-use';
|
||||
|
||||
import { GrafanaTheme2, toIconName } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Card, Checkbox, CollapsableSection, Icon, Spinner, useStyles2 } from '@grafana/ui';
|
||||
import { config } from 'app/core/config';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { getSectionStorageKey } from 'app/features/search/utils';
|
||||
import { useUniqueId } from 'app/plugins/datasource/influxdb/components/useUniqueId';
|
||||
|
||||
import { SearchItem } from '../..';
|
||||
import { GENERAL_FOLDER_UID, SEARCH_EXPANDED_FOLDER_STORAGE_KEY } from '../../constants';
|
||||
import { GENERAL_FOLDER_UID } from '../../constants';
|
||||
import { getGrafanaSearcher } from '../../service';
|
||||
import { getFolderChildren } from '../../service/folders';
|
||||
import { queryResultToViewItem } from '../../service/utils';
|
||||
@@ -57,14 +58,9 @@ export const FolderSection = ({
|
||||
renderStandaloneBody,
|
||||
tags,
|
||||
}: SectionHeaderProps) => {
|
||||
const uid = section.uid;
|
||||
const editable = selectionToggle != null;
|
||||
|
||||
const styles = useStyles2(useCallback((theme: GrafanaTheme2) => getSectionHeaderStyles(theme, editable), [editable]));
|
||||
const [sectionExpanded, setSectionExpanded] = useState(() => {
|
||||
const lastExpandedFolder = window.localStorage.getItem(SEARCH_EXPANDED_FOLDER_STORAGE_KEY);
|
||||
return lastExpandedFolder === uid;
|
||||
});
|
||||
const [sectionExpanded, setSectionExpanded] = useLocalStorage(getSectionStorageKey(section.title), false);
|
||||
|
||||
const results = useAsync(async () => {
|
||||
if (!sectionExpanded && !renderStandaloneBody) {
|
||||
@@ -77,20 +73,7 @@ export const FolderSection = ({
|
||||
}, [sectionExpanded, tags]);
|
||||
|
||||
const onSectionExpand = () => {
|
||||
const newExpandedValue = !sectionExpanded;
|
||||
|
||||
if (newExpandedValue) {
|
||||
// If we've just expanded the section, remember it to local storage
|
||||
window.localStorage.setItem(SEARCH_EXPANDED_FOLDER_STORAGE_KEY, uid);
|
||||
} else {
|
||||
// Else, when closing a section, remove it from local storage only if this folder was the most recently opened
|
||||
const lastExpandedFolder = window.localStorage.getItem(SEARCH_EXPANDED_FOLDER_STORAGE_KEY);
|
||||
if (lastExpandedFolder === uid) {
|
||||
window.localStorage.removeItem(SEARCH_EXPANDED_FOLDER_STORAGE_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
setSectionExpanded(newExpandedValue);
|
||||
setSectionExpanded(!sectionExpanded);
|
||||
};
|
||||
|
||||
const onToggleFolder = (evt: React.FormEvent) => {
|
||||
|
||||
@@ -14,18 +14,6 @@ export const hasFilters = (query: SearchState) => {
|
||||
return Boolean(query.query || query.tag?.length > 0 || query.starred || query.sort);
|
||||
};
|
||||
|
||||
/** Cleans up old local storage values that remembered many open folders */
|
||||
export const cleanupOldExpandedFolders = () => {
|
||||
const keyPrefix = SECTION_STORAGE_KEY + '.';
|
||||
|
||||
for (let index = 0; index < window.localStorage.length; index++) {
|
||||
const lsKey = window.localStorage.key(index);
|
||||
if (lsKey?.startsWith(keyPrefix)) {
|
||||
window.localStorage.removeItem(lsKey);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get storage key for a dashboard folder by its title
|
||||
* @param title
|
||||
|
||||
@@ -108,7 +108,7 @@ RUN rm dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz
|
||||
# Use old Debian (LTS into 2024) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:buster-20220822
|
||||
|
||||
ENV GOVERSION=1.20.10 \
|
||||
ENV GOVERSION=1.20.8 \
|
||||
PATH=/usr/local/go/bin:$PATH \
|
||||
GOPATH=/go \
|
||||
NODEVERSION=18.12.0-1nodesource1 \
|
||||
|
||||
@@ -822,7 +822,7 @@ def cloud_plugins_e2e_tests_step(suite, cloud, trigger = None):
|
||||
environment = {
|
||||
"CYPRESS_CI": "true",
|
||||
"HOST": "grafana-server",
|
||||
"GITHUB_TOKEN": from_secret("github_token"),
|
||||
"GITHUB_TOKEN": from_secret("github_token_pr"),
|
||||
"AZURE_SP_APP_ID": from_secret("azure_sp_app_id"),
|
||||
"AZURE_SP_PASSWORD": from_secret("azure_sp_app_pw"),
|
||||
"AZURE_TENANT": from_secret("azure_tenant"),
|
||||
@@ -968,8 +968,8 @@ def publish_images_step(ver_mode, docker_repo, trigger = None):
|
||||
|
||||
if ver_mode == "pr":
|
||||
environment = {
|
||||
"DOCKER_USER": from_secret("docker_username"),
|
||||
"DOCKER_PASSWORD": from_secret("docker_password"),
|
||||
"DOCKER_USER": from_secret("docker_username_pr"),
|
||||
"DOCKER_PASSWORD": from_secret("docker_password_pr"),
|
||||
"GITHUB_APP_ID": from_secret("delivery-bot-app-id"),
|
||||
"GITHUB_APP_INSTALLATION_ID": from_secret("delivery-bot-app-installation-id"),
|
||||
"GITHUB_APP_PRIVATE_KEY": from_secret("delivery-bot-app-private-key"),
|
||||
@@ -1224,7 +1224,6 @@ def get_windows_steps(ver_mode, bucket = "%PRERELEASE_BUCKET%"):
|
||||
if ver_mode in (
|
||||
"release",
|
||||
"release-branch",
|
||||
"main",
|
||||
):
|
||||
gcp_bucket = "{}/artifacts/downloads".format(bucket)
|
||||
if ver_mode == "release":
|
||||
@@ -1245,28 +1244,42 @@ def get_windows_steps(ver_mode, bucket = "%PRERELEASE_BUCKET%"):
|
||||
"cp C:\\App\\nssm-2.24.zip .",
|
||||
]
|
||||
|
||||
if ver_mode == "release":
|
||||
if ver_mode in ("release",):
|
||||
version = "${DRONE_TAG:1}"
|
||||
installer_commands.extend(
|
||||
[
|
||||
".\\grabpl.exe windows-installer --target {} --edition oss {}".format("gs://{}/{}/oss/{}/grafana-{}.windows-amd64.zip".format(gcp_bucket, ver_part, ver_mode, version), ver_part),
|
||||
'$$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]',
|
||||
'gsutil cp "$$fname" gs://{}/{}/oss/{}/'.format(gcp_bucket, ver_part, dir),
|
||||
'gsutil cp "$$fname.sha256" gs://{}/{}/oss/{}/'.format(gcp_bucket, ver_part, dir),
|
||||
],
|
||||
)
|
||||
if ver_mode in ("main"):
|
||||
installer_commands.extend(
|
||||
[
|
||||
".\\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER",
|
||||
'$$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]',
|
||||
'gsutil cp "$$fname" gs://{}/oss/{}/'.format(gcp_bucket, dir),
|
||||
'gsutil cp "$$fname.sha256" gs://{}/oss/{}/'.format(
|
||||
gcp_bucket,
|
||||
dir,
|
||||
".\\grabpl.exe windows-installer --target {} --edition oss {}".format(
|
||||
"gs://{}/{}/oss/{}/grafana-{}.windows-amd64.zip".format(gcp_bucket, ver_part, ver_mode, version),
|
||||
ver_part,
|
||||
),
|
||||
'$$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]',
|
||||
],
|
||||
)
|
||||
if ver_mode == "main":
|
||||
installer_commands.extend(
|
||||
[
|
||||
"gsutil cp $$fname gs://{}/oss/{}/".format(gcp_bucket, dir),
|
||||
'gsutil cp "$$fname.sha256" gs://{}/oss/{}/'.format(
|
||||
gcp_bucket,
|
||||
dir,
|
||||
),
|
||||
],
|
||||
)
|
||||
else:
|
||||
installer_commands.extend(
|
||||
[
|
||||
"gsutil cp $$fname gs://{}/{}/oss/{}/".format(
|
||||
gcp_bucket,
|
||||
ver_part,
|
||||
dir,
|
||||
),
|
||||
'gsutil cp "$$fname.sha256" gs://{}/{}/oss/{}/'.format(
|
||||
gcp_bucket,
|
||||
ver_part,
|
||||
dir,
|
||||
),
|
||||
],
|
||||
)
|
||||
steps.append(
|
||||
{
|
||||
"name": "build-windows-installer",
|
||||
@@ -1314,7 +1327,7 @@ def trigger_test_release():
|
||||
"name": "trigger-test-release",
|
||||
"image": images["build_image"],
|
||||
"environment": {
|
||||
"GITHUB_TOKEN": from_secret("github_token"),
|
||||
"GITHUB_TOKEN": from_secret("github_token_pr"),
|
||||
"TEST_TAG": "v0.0.0-test",
|
||||
},
|
||||
"commands": [
|
||||
|
||||
@@ -8,7 +8,7 @@ images = {
|
||||
"publish_image": "grafana/grafana-ci-deploy:1.3.3",
|
||||
"alpine_image": "alpine:3.18.3",
|
||||
"curl_image": "byrnedo/alpine-curl:0.1.8",
|
||||
"go_image": "golang:1.20.10",
|
||||
"go_image": "golang:1.20.8",
|
||||
"plugins_slack_image": "plugins/slack",
|
||||
"postgres_alpine_image": "postgres:12.3-alpine",
|
||||
"mysql5_image": "mysql:5.7.39",
|
||||
|
||||
@@ -17,9 +17,6 @@ rgm_destination = "destination"
|
||||
rgm_github_token = "github_token"
|
||||
rgm_dagger_token = "dagger_token"
|
||||
|
||||
docker_username = "docker_username"
|
||||
docker_password = "docker_password"
|
||||
|
||||
npm_token = "npm_token"
|
||||
|
||||
def from_secret(secret):
|
||||
@@ -44,8 +41,8 @@ def secrets():
|
||||
vault_secret("github_token", "infra/data/ci/github/grafanabot", "pat"),
|
||||
vault_secret(drone_token, "infra/data/ci/drone", "machine-user-token"),
|
||||
vault_secret(prerelease_bucket, "infra/data/ci/grafana/prerelease", "bucket"),
|
||||
vault_secret(docker_username, "infra/data/ci/grafanaci-docker-hub", "username"),
|
||||
vault_secret(docker_password, "infra/data/ci/grafanaci-docker-hub", "password"),
|
||||
vault_secret("docker_username", "infra/data/ci/grafanaci-docker-hub", "username"),
|
||||
vault_secret("docker_password", "infra/data/ci/grafanaci-docker-hub", "password"),
|
||||
vault_secret(
|
||||
gcp_upload_artifacts_key,
|
||||
"infra/data/ci/grafana/releng/artifacts-uploader-service-account",
|
||||
@@ -112,6 +109,11 @@ def secrets():
|
||||
"infra/data/ci/grafana-release-eng/artifact-publishing",
|
||||
"static_asset_editions",
|
||||
),
|
||||
vault_secret(
|
||||
"enterprise2-cdn-path",
|
||||
"infra/data/ci/grafana-release-eng/enterprise2",
|
||||
"cdn_path",
|
||||
),
|
||||
vault_secret(
|
||||
rgm_gcp_key_base64,
|
||||
"infra/data/ci/grafana-release-eng/rgm",
|
||||
@@ -127,6 +129,11 @@ def secrets():
|
||||
"infra/data/ci/grafana-release-eng/rgm",
|
||||
"dagger_token",
|
||||
),
|
||||
vault_secret(
|
||||
rgm_github_token,
|
||||
"infra/data/ci/github/grafanabot",
|
||||
"pat",
|
||||
),
|
||||
# grafana-delivery-bot secrets
|
||||
vault_secret(
|
||||
"delivery-bot-app-id",
|
||||
|
||||
36
yarn.lock
36
yarn.lock
@@ -2998,9 +2998,9 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana-plugins/input-datasource@workspace:plugins-bundled/internal/input-datasource"
|
||||
dependencies:
|
||||
"@grafana/data": 9.5.13
|
||||
"@grafana/toolkit": 9.5.13
|
||||
"@grafana/ui": 9.5.13
|
||||
"@grafana/data": 9.5.12
|
||||
"@grafana/toolkit": 9.5.12
|
||||
"@grafana/ui": 9.5.12
|
||||
"@types/jest": 26.0.15
|
||||
"@types/lodash": 4.14.149
|
||||
"@types/react": 17.0.30
|
||||
@@ -3033,12 +3033,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@grafana/data@9.5.13, @grafana/data@workspace:*, @grafana/data@workspace:packages/grafana-data":
|
||||
"@grafana/data@9.5.12, @grafana/data@workspace:*, @grafana/data@workspace:packages/grafana-data":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/data@workspace:packages/grafana-data"
|
||||
dependencies:
|
||||
"@braintree/sanitize-url": 6.0.2
|
||||
"@grafana/schema": 9.5.13
|
||||
"@grafana/schema": 9.5.12
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@rollup/plugin-commonjs": 23.0.2
|
||||
"@rollup/plugin-json": 5.0.1
|
||||
@@ -3098,7 +3098,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@grafana/e2e-selectors@9.5.13, @grafana/e2e-selectors@workspace:*, @grafana/e2e-selectors@workspace:packages/grafana-e2e-selectors":
|
||||
"@grafana/e2e-selectors@9.5.12, @grafana/e2e-selectors@workspace:*, @grafana/e2e-selectors@workspace:packages/grafana-e2e-selectors":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/e2e-selectors@workspace:packages/grafana-e2e-selectors"
|
||||
dependencies:
|
||||
@@ -3135,7 +3135,7 @@ __metadata:
|
||||
"@babel/core": 7.20.5
|
||||
"@babel/preset-env": 7.20.2
|
||||
"@cypress/webpack-preprocessor": 5.17.0
|
||||
"@grafana/e2e-selectors": 9.5.13
|
||||
"@grafana/e2e-selectors": 9.5.12
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@mochajs/json-file-reporter": ^1.2.0
|
||||
"@rollup/plugin-node-resolve": 15.0.1
|
||||
@@ -3295,11 +3295,11 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/runtime@workspace:packages/grafana-runtime"
|
||||
dependencies:
|
||||
"@grafana/data": 9.5.13
|
||||
"@grafana/e2e-selectors": 9.5.13
|
||||
"@grafana/data": 9.5.12
|
||||
"@grafana/e2e-selectors": 9.5.12
|
||||
"@grafana/faro-web-sdk": 1.0.2
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@grafana/ui": 9.5.13
|
||||
"@grafana/ui": 9.5.12
|
||||
"@rollup/plugin-commonjs": 23.0.2
|
||||
"@rollup/plugin-node-resolve": 15.0.1
|
||||
"@sentry/browser": 6.19.7
|
||||
@@ -3350,7 +3350,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@grafana/schema@9.5.13, @grafana/schema@workspace:*, @grafana/schema@workspace:packages/grafana-schema":
|
||||
"@grafana/schema@9.5.12, @grafana/schema@workspace:*, @grafana/schema@workspace:packages/grafana-schema":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/schema@workspace:packages/grafana-schema"
|
||||
dependencies:
|
||||
@@ -3369,7 +3369,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@grafana/toolkit@9.5.13, @grafana/toolkit@workspace:*, @grafana/toolkit@workspace:packages/grafana-toolkit":
|
||||
"@grafana/toolkit@9.5.12, @grafana/toolkit@workspace:*, @grafana/toolkit@workspace:packages/grafana-toolkit":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/toolkit@workspace:packages/grafana-toolkit"
|
||||
dependencies:
|
||||
@@ -3385,10 +3385,10 @@ __metadata:
|
||||
"@babel/preset-env": 7.18.9
|
||||
"@babel/preset-react": 7.18.6
|
||||
"@babel/preset-typescript": 7.18.6
|
||||
"@grafana/data": 9.5.13
|
||||
"@grafana/data": 9.5.12
|
||||
"@grafana/eslint-config": 5.1.0
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@grafana/ui": 9.5.13
|
||||
"@grafana/ui": 9.5.12
|
||||
"@jest/core": 27.5.1
|
||||
"@types/command-exists": ^1.2.0
|
||||
"@types/eslint": 8.4.1
|
||||
@@ -3469,17 +3469,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@grafana/ui@9.5.13, @grafana/ui@workspace:*, @grafana/ui@workspace:packages/grafana-ui":
|
||||
"@grafana/ui@9.5.12, @grafana/ui@workspace:*, @grafana/ui@workspace:packages/grafana-ui":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/ui@workspace:packages/grafana-ui"
|
||||
dependencies:
|
||||
"@babel/core": 7.20.5
|
||||
"@emotion/css": 11.10.6
|
||||
"@emotion/react": 11.10.6
|
||||
"@grafana/data": 9.5.13
|
||||
"@grafana/e2e-selectors": 9.5.13
|
||||
"@grafana/data": 9.5.12
|
||||
"@grafana/e2e-selectors": 9.5.12
|
||||
"@grafana/faro-web-sdk": 1.0.2
|
||||
"@grafana/schema": 9.5.13
|
||||
"@grafana/schema": 9.5.12
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@leeoniya/ufuzzy": 1.0.6
|
||||
"@mdx-js/react": 1.6.22
|
||||
|
||||
Reference in New Issue
Block a user