Automatic update Grafana datasource docs from VictoriaMetrics/grafana-datasource@bc562ef (#6481)

This commit is contained in:
Github Actions 2024-06-14 15:43:30 +08:00 committed by GitHub
parent 2184c0c730
commit 2d575cd27a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,16 +110,7 @@ datasources:
Please find the example of provisioning Grafana instance with VictoriaMetrics datasource below:
1. Create folder `./provisioning/datasource` with datasource example file:
1. Download the latest release:
``` bash
ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/grafana-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
curl -L https://github.com/VictoriaMetrics/grafana-datasource/releases/download/$ver/victoriametrics-datasource-$ver.tar.gz -o plugin.tar.gz
tar -xf plugin.tar.gz -C ./
rm plugin.tar.gz
```
1. Create a file at `./provisioning/datasources/vm.yml` with datasource example file.
1. Define Grafana installation via docker-compose:
@ -127,15 +118,13 @@ Please find the example of provisioning Grafana instance with VictoriaMetrics da
version: '3.0'
services:
grafana:
container_name: 'grafana-datasource'
build:
context: ./.config
args:
grafana_version: ${GRAFANA_VERSION:-9.1.2}
image: grafana/grafana:11.0.0
environment:
- GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/grafana-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2.zip;victoriametrics-datasource
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victoriametrics-datasource
ports:
- 3000:3000/tcp
volumes:
- ./victoriametrics-datasource:/var/lib/grafana/plugins/grafana-datasource
- ./provisioning:/etc/grafana/provisioning
```
@ -155,6 +144,21 @@ When Grafana starts successfully datasources should be present on the datasource
Example with Grafana [helm chart](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md):
Option 1. Using Grafana provisioning:
``` yaml
env:
GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/grafana-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2.zip;victoriametrics-datasource"
```
Option 2. Using Grafana plugins section in `values.yaml`:
``` yaml
plugins:
- https://github.com/VictoriaMetrics/grafana-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2zip;victoriametrics-datasource
```
Option 3. Using init container:
``` yaml
extraInitContainers:
- name: "load-vm-ds-plugin"
@ -193,7 +197,7 @@ sidecar:
See more about chart settings [here](https://github.com/grafana/helm-charts/blob/541d97051de87a309362e02d08741ffc868cfcd6/charts/grafana/values.yaml)
Another option would be to build custom Grafana image with plugin based on same installation instructions.
Option 4 would be to build custom Grafana image with plugin based on same installation instructions.
#### Grafana operator