The VictoriaLogs datasource plugin allows you to query and visualize VictoriaLogs data in Grafana.
Installation #
For detailed instructions on how to install the plugin in Grafana Cloud or locally, please checkout the Plugin installation docs.
Grafana Provisioning #
Provisioning of Grafana plugin requires creating datasource config file:
|
|
Please find the example of provisioning Grafana instance with VictoriaLogs datasource below:
Create a file at
./provisioning/datasources/vm.yml
with datasource example file.Define Grafana installation via docker-compose:
1 2 3 4 5 6 7 8 9 10
version: '3.0' services: grafana: image: grafana/grafana:11.0.0 environment: - GF_INSTALL_PLUGINS=victoriametrics-logs-datasource ports: - 3000:3000/tcp volumes: - ./provisioning:/etc/grafana/provisioning
Run docker-compose file:
|
|
After Grafana starts successfully, datasource should be available in the datasources tab

Install in Kubernetes #
Grafana helm chart #
Example with Grafana helm chart:
Option 1. Using Grafana provisioning:
|
|
Option 2. Using Grafana plugins section in values.yaml
:
|
|
Option 3. Using init container:
|
|
For grafana-operator
users, the above configuration should be done for the part /spec/deployment/spec/template/spec/initContainers
of your kind=Grafana
resource.
This example uses init container to download and install plugin. To allow Grafana using this container as a sidecar set the following config:
|
|
See more about chart settings here
Option 4. would be to build custom Grafana image with plugin based on same installation instructions.
Grafana operator #
Example with Grafana operator:
|
|
See Grafana operator reference to find more about Grafana operator. This example uses init container to download and install plugin.
It is also possible to request plugin at GrafanaDatasource
or GrafanaDashboard
CRDs.
For example:
|
|
Dev release installation #
To download plugin build and move contents into Grafana plugins directory:
1 2 3 4
ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/victorialogs-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1) curl -L https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/$ver/victoriametrics-logs-datasource-$ver.tar.gz -o /var/lib/grafana/plugins/vl-plugin.tar.gz tar -xf /var/lib/grafana/plugins/vl-plugin.tar.gz -C /var/lib/grafana/plugins/ rm /var/lib/grafana/plugins/vl-plugin.tar.gz
Restart Grafana
Getting started development #
1. Configure Grafana #
Installing dev version of Grafana plugin requires to change grafana.ini
config to allow loading unsigned plugins:
|
|
|
|
2. Run the plugin #
In the project directory, you can run:
|
|
3. How to build backend plugin #
From the root folder of the project run the following command:
|
|
This command will build executable multi-platform files to the victoriametrics-logs-datasource
folder for the following platforms:
- linux/amd64
- linux/arm64
- linux/arm
- linux/386
- amd64
- arm64
- windows
4.How to build frontend plugin #
From the root folder of the project run the following command:
|
|
This command will build all frontend app into victoriametrics-logs-datasource
folder.
5. How to build frontend and backend parts of the plugin: #
When frontend and backend parts of the plugin is required, run the following command from the root folder of the project:
|
|
This command will build frontend part and backend part or the plugin and locate both parts into victoriametrics-logs-datasource
folder.
How to make new release #
- Make sure there are no open security issues.
- Change version in package.json in a
main
branch - Trigger release pipeline.
- Go to releases page once pipeline is finished and verify release with the name
TAG
has been created and has all the needed binaries and checksums attached.
Notes #
In the plugin.json
file of our plugin, the metrics
field is set to true
. This is not to support metric queries in the classical sense but to ensure our plugin can be selected in the Grafana panel editor.
For more information on the fields in plugin.json
, please refer to the Grafana documentation.
License #
This project is licensed under the Apache 2.0 license.