diff --git a/docs/grafana-datasource.md b/docs/grafana-datasource.md index 61c43b1a96..773377fee4 100644 --- a/docs/grafana-datasource.md +++ b/docs/grafana-datasource.md @@ -57,6 +57,16 @@ See [why VictoriaMetrics datasource is unsigned](#why-victoriaMetrics-datasource For detailed instructions on how to install the plugin on Grafana Cloud or locally, please checkout the [Plugin installation docs](https://grafana.com/docs/grafana/latest/plugins/installation/). +### Install via Docker + +[VictoriaMetrics repo](https://github.com/victoriaMetrics/victoriaMetrics) provides a complete +[docker-compose](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#docker-compose-environment-for-victoriametrics) +environment to spin-up all required components via Docker. + +To begin, clone [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) repository and follow +steps described in the [README](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#docker-compose-environment-for-victoriametrics). + + ### Grafana Provisioning Provision of Grafana plugin requires to create @@ -109,7 +119,7 @@ Please find the example of provisioning Grafana instance with VictoriaMetrics da 1. Download the latest release: - ```bash + ``` 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 ./victoriametrics-datasource @@ -143,7 +153,7 @@ docker-compose -f docker-compose.yaml up When Grafana starts successfully datasources should be present on the datasources tab

- Configuration + Configuration

### Install in Kubernetes @@ -239,7 +249,7 @@ spec: allow_loading_unsigned_plugins: victoriametrics-datasource ``` -See [Grafana operator reference](https://grafana.github.io/grafana-operator/docs/grafana/) to find more about +See [Grafana operator reference](https://grafana-operator.github.io/grafana-operator/docs/grafana/) to find more about Grafana operator. This example uses init container to download and install plugin. @@ -248,7 +258,7 @@ This example uses init container to download and install plugin. 1. To download plugin build and move contents into Grafana plugins directory: - ```bash + ``` 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 /var/lib/grafana/plugins/plugin.tar.gz tar -xf /var/lib/grafana/plugins/plugin.tar.gz -C /var/lib/grafana/plugins/ @@ -262,19 +272,14 @@ This example uses init container to download and install plugin. ### 1. Configure Grafana Installing dev version of Grafana plugin requires to change `grafana.ini` config to allow loading unsigned plugins: - -{% raw %} ``` ini # Directory where Grafana will automatically scan and look for plugins plugins = {{path to directory with plugin}} ``` -{% endraw %} - ``` ini [plugins] allow_loading_unsigned_plugins = victoriametrics-datasource ``` - ### 2. Run the plugin In the project directory, you can run: ``` diff --git a/docs/provision_datasources.png b/docs/provision_datasources.png new file mode 100644 index 0000000000..7c633f91af Binary files /dev/null and b/docs/provision_datasources.png differ