Plugins 〉VictoriaLogs


Developer

VictoriaMetrics

Sign up to receive occasional product news and updates:



Data Source
commercial

VictoriaLogs

  • Overview
  • Installation
  • Change log
  • Related content

VictoriaLogs datasource for Grafana

The VictoriaLogs Grafana plugin allows Grafana to query, visualize, and interact with VictoriaLogs, a high-performance log storage and processing system.

Grafana Dashboard Screenshot

Capabilities

  1. Use LogsQL to filter, aggregate, and transform logs data to gain insights into application behavior.
  2. Use Explore mode with Grafana.
  3. Show live-streaming logs.
  4. Build dashboards and setup alerts.
  5. Use Ad Hoc filters.

Try it at VictoriaMetrics playground!

Installation

For detailed instructions on how to install the plugin on Grafana Cloud or locally, please checkout the Plugin installation docs.

Manual configuration via UI

Once the plugin is installed on your Grafana instance, follow these instructions to add a new VictoriaLogs data source, and enter configuration options.

Configuration via file

Provisioning of Grafana plugin requires creating datasource config file:

apiVersion: 1
datasources:
  - name: VictoriaLogs
    type: victoriametrics-logs-datasource
    access: proxy
    url: http://victorialogs:9428
    isDefault: true

Building queries

VictoriaLogs query language is LogsQL. Queries can be built using raw LogsQL or via QueryBuilder.

See panels examples at VictoriaMetrics playground and LogsQL examples here.

Logs panel

For using Logs panel switch to Raw Logs query type:

Logs panel

Time series panel

For using Time series panel switch to Range query type:

Time series panel

Stats panel

For using Stats panel switch to Instant query type:

Stats panel

For enabling background visualization switch to Range query type.

Table panel

For using Table panel switch to Raw Logs query type:

Table panel

And apply Transformations by labels:

Transformations

License

This project is licensed under the Apache 2.0 license.

Installing VictoriaLogs on Grafana Cloud:

For more information, visit the docs on plugin installation.

Changelog

tip

v0.15.0

  • FEATURE: add configuration screen for derived fields. See this issue. Thanks to @090809 for the pull request.
  • BUGFIX: fix live mode shows the first query result instead of separately requested two different results. See this issue.

v0.14.3

  • BUGFIX: fix image links in public readme.

v0.14.2

  • BUGFIX: fix issue with plugin signature.

v0.14.1

  • BUGFIX: fix the sign plugin procedure for the new release. See this PR and See this PR.

v0.14.0

  • FEATURE: enable plugin sign procedure for new releases. See this PR.

v0.13.5

  • BUGFIX: clean up the plugin codebase after the plugin verification procedure. See this PR and this PR.

v0.13.4

  • BUGFIX: updated the backend plugin ID and revised the README.md file after the plugin verification procedure. See this PR.

v0.13.3

  • BUGFIX: fix query display text in query history to show the actual expression instead of the full query object. See this issue.
  • BUGFIX: fix query type switching when creating alerts in Grafana. See this issue
  • BUGFIX: fix parsings of the datasource settings in the plugin. See this issue.

v0.13.2

  • SECURITY: bump Go version to 1.23.4. See the list of issues addressed in Go1.23.4.

  • SECURITY: bump golang.org/x/net to 0.33.0. See https://github.com/advisories/GHSA-w32m-9786-jp63

  • FEATURE: enable to set headers for every request to the datasource. It helps to use custom headers in the Grafana to define AccountID and ProjectID if it is needed. See this issue.

v0.13.1

  • FEATURE: update plugin dependencies to satisfy Grafana marketplace requirements.

  • BUGFIX: filter out empty variable values in queries. See this issue.

v0.13.0

⚠️ Breaking Change: Plugin ID Updated
Update Note 1:
In the new version of the plugin, the plugin ID has been updated. The new plugin ID is victoriametrics-logs-datasource. This is a breaking change: Grafana will treat this as a new plugin.

  • You must update the allow_loading_unsigned_plugins field in the grafana.ini or defaults.ini configuration file.
    Example:
    allow_loading_unsigned_plugins = victoriametrics-logs-datasource  
    
  • If you are using provisioning, update the type field to victoriametrics-logs-datasource in your provisioning configuration.
  • After making these changes, you must restart the Grafana server for the updates to take effect.
  • FEATURE: update plugin id name to victoriametrics-logs-datasource to prepare the plugin for the sign procedure. See this issue.

v0.12.0

  • FEATURE: add compatibility for Grafana v10.x.x to ensure /select/logs/hits displays precise logs volume on the Explore page. See this comment.

  • BUGFIX: properly parse timestamps with milliseconds precision in datasource response. See this issue.

v0.11.1

  • BUGFIX: fix the check for the stats pipe functions in expressions.
  • BUGFIX: fix plugin loading issue in Grafana v10.x.x. See this issue.

v0.11.0

  • FEATURE: add tooltips and info messages for query types. Now, plugin will warn about correct usage of stats panels and will provide more info about different query types.

  • FEATURE: automatically add _time field if it s not present in the query for the stats API call. See this issue.

  • FEATURE: add support for /select/logs/hits to display precise logs volume on the Explore page. See this issue.

  • BUGFIX: fix bug with incomplete rendering of time series panels when selecting bigger time intervals.

  • BUGFIX: fix a bug where the time range was reset when using query variables. See this issue.

  • BUGFIX: fix incorrect application of ad-hoc filters in panels. See this issue.

  • BUGFIX: fix replacement of multi-variables in expressions. See this issue.

v0.10.0

  • FEATURE: add alerting support. See this issue.

  • FEATURE: implement a toggle to switch between instant and range requests. See this issue.

  • FEATURE: add options to configure the legend template, limit for number of log lines, and step. See this and this issues.

  • BUGFIX: fix support mulit options with label values of stream-fields. See this issue.

v0.9.0

  • FEATURE: Add support for the $__range variable in queries. It will be transformed to the [time_from, time_to] in the Unix format. See this issue.

  • BUGFIX: show the original error message returned from the VictoriaLogs backend. It should help to troubleshoot problems with query or syntax. See this issue.

v0.8.0

  • FEATURE: add support for the /select/logsql/stats_query and /select/logsql/stats_query_range API calls. This feature helps to build different panels with statistic data. See this issue.

  • BUGFIX: fix options sorting in variables for numerical data type. See this issue.

v0.7.0

  • FEATURE: add support to display live logs by querying the tail endpoint in the datasource. See this issue

v0.6.2

  • BUGFIX: allow reading strings with arbitrary length when parsing response in stream mode. See this issue.

v0.6.1

  • BUGFIX: fixed healthcheck

v0.6.0

  • FEATURE: add limit param for the /field_values request. See this issue.

  • BUGFIX: fix variable substitution in queries. See this issue.

  • BUGFIX: fixed health path for case, when url ends with trailing slash.

  • BUGFIX: fix the application of filtering in queries. See this issue.

v0.5.0

  • FEATURE: add support of the $__interval variable in queries. See this issue. Thanks to @yincongcyincong for the pull request.

  • BUGFIX: correctly pass time range filter when querying variable values. Before, time filter wasn't applied for /field_values and /field_names API calls. See this and this issues.

  • BUGFIX: fix the issue with displaying incorrect subfields when requesting logs with different set of fields. See this issue.

v0.4.0

  • FEATURE: make retry attempt for datasource requests if returned error is a temporary network error. See this issue

  • BUGFIX: fix dynamic variable issue causing this is undefined error. See this issue.

  • BUGFIX: fix multi-value variable handling to properly format queries. See this issue.

  • BUGFIX: fix issue with special characters in variable values. See this issue.

v0.3.0

  • FEATURE: add beta version of the query builder. The builder allows selecting field names and field value. See this issue.
  • FEATURE: add support for loading data for variables, including log field names and values. This feature allows querying /select/logsql/field_names for field names and /select/logsql/field_values for field values. See this issue.

v0.2.6

  • BUGFIX: fix issue with forwarding headers from datasource to the backend or proxy. It might be helpful if a user wants to use some kind of authentication. See this issue

v0.2.5

  • BUGFIX: fix bug with parsing response when time field is empty but message and labels are present. It happens when the user tries to show only stats number. See this issue.

v0.2.4

  • BUGFIX: fix bug with parsing response when one of the field contains ANSI escape sequences. See this issue.

v0.2.3

  • BUGFIX: fix bug with displaying response when one of the stream field is defined and lines are not collected. See this issue.

v0.2.2

  • BUGFIX: fix bug with displaying responses with a custom set of fields. See this issue.
  • BUGFIX: change time range limitation from _time in the expression to start and end query args. See this issue.

v0.2.1

  • BUGFIX: change the metrics flag from false to true in plugin.json to ensure the plugin appears in the Grafana datasource selection list.

v0.2.0

  • FEATURE: add support for variables in the query. See this issue.

  • FEATURE: add client-side record limit check for VictoriaLogs < v0.5.0 support. See this issue.

  • BUGFIX: fix a bug where a manually removed filter would persist in the query after the "Run query" button is clicked.See this issue.

  • BUGFIX: fix query handling to correctly apply _time filter across all queries. See this issue and this issue.

  • BUGFIX: fix an issue where sometimes an empty response was returned despite having data in VictoriaLogs. See this issue.