Note: this is currently an experimental proof-of-concept plugin.
This is a Grafana datasource backend plugin for querying an InfluxDB IOx server via its SQL frontend over Arrow Flight. Currently the plugin provides the ability to manage a connection to a database on IOx, via its gRPC API, and also to execute SQL queries against that database.
The plugin is not currently signed so you will need to explicitly give Grafana permission to use it.
To do that you need to either set the following in your grafana.ini
[plugins]
;enable_alpha = false
;app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = influxdata-influxdb-iox-grafana
;marketplace_url = https://grafana.com/grafana/plugins/
or you will need to set the relevant environment variable:
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=influxdata-influxdb-iox-grafana
Oh, you will need the plugin of course! Grab the archive from the releases page on the repo.
Unpack it an put it somewhere.
You will then need to tell Grafana where to look for the plugin, which you can do either by modifying the Grafana config in grafana.ini
:
#################################### Paths ####################################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
;data = /var/lib/grafana
# Temporary files in `data` directory older than given duration will be removed
;temp_data_lifetime = 24h
# Directory where grafana can store logs
;logs = /var/log/grafana
# Directory where grafana will automatically scan and look for plugins
plugins = /Users/me/grafana-dev/plugins/
or by using an env var:
GF_PATHS_PLUGINS=/Users/me/grafana-dev/plugins/
If that all works out then when you restart Grafana it should find it and you should be able to see it as an unsigned datasource.
A data source backend plugin consists of both frontend and backend components.
-
Install dependencies
yarn install
-
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
-
Build plugin in production mode
yarn build
-
Update Grafana plugin SDK for Go dependency to the latest minor version:
go get -u github.com/grafana/grafana-plugin-sdk-go go mod tidy
-
Build backend plugin binaries for Linux, Windows and Darwin:
mage -v
-
List all available Mage targets for additional commands:
mage -l
- Build a data source backend plugin tutorial
- Grafana documentation
- Grafana Tutorials - Grafana Tutorials are step-by-step guides that help you make the most of Grafana
- Grafana UI Library - UI components to help you build interfaces using Grafana Design System
- Grafana plugin SDK for Go