Skip to main content

Grafana

The Foxglove data source plugin charts values from your Primary Site as time series in Grafana. Point a panel at a FoxQL path such as /imu.linear_acceleration.x.

It uses the same query engine as the Search page. The plugin is a Grafana data source only — it does not add custom panels or embed the Foxglove app.

note

The Grafana integration is an Enterprise add-on and must be enabled for your organization. Contact us to get access.

Requirements

RequirementDetails
Foxglove planEnterprise, with the Grafana integration enabled for your organization
GrafanaVersion 11.5.0 or later, self-hosted or Grafana Cloud
API keyAn API key with the data.search and devices.list capabilities
NetworkGrafana must reach api.foxglove.dev (or your API Base URL) and your site's query endpoint over HTTPS

Each data source targets one Project and one Primary Site. To chart data from more than one Primary Site, add a data source per site.

Install the plugin

Install foxglovedev-foxglove-datasource from the Grafana plugin catalog. You need Grafana admin permissions to install plugins and add data sources.

In Grafana, go to Administration → Plugins and data → Plugins, search for "Foxglove", and click Install.

Or with Grafana CLI:

grafana-cli plugins install foxglovedev-foxglove-datasource

Restart the Grafana server after a CLI install.

You can also install from a signed zip on the GitHub releases page — see Grafana's plugin installation guide.

Configuration

Create an API key with these capabilities:

  • data.search
  • devices.list

Look up your Project ID and Site ID on the Projects and Sites settings pages.

note

If the "search" capability group doesn't appear when creating a key, the Grafana integration isn't enabled for your organization yet. Contact us.

In Grafana, go to Connections → Data sources → Add new data source and choose Foxglove.

FieldRequiredValue
API Base URLNoDefaults to https://api.foxglove.dev. Most users should not change this field.
API KeyYesYour API key
Project IDYesThe proj_ ID from the Projects settings page
Site IDYesThe site_ ID of your Primary Site from the Sites settings page
Query Timeout (seconds)NoPer-request limit for each query. Leave empty or set to 0 to use Grafana's HTTP client timeout

Click Save & test. A working configuration reports "Successfully connected to Foxglove API".

Build your first panel

  1. Create a dashboard and add a Time series panel.
  2. Select the Foxglove data source.
  3. Leave Selection set to Message Path and enter a numeric path — for example /imu.linear_acceleration.x. Confirm the path on the Search page if you're unsure.
  4. Set the dashboard time range to a window where at least one device was recording.

The panel draws one series per device with data for that path in the time range. If it's empty, widen the time range or confirm the path on the Search page. See building queries for filters, grouping, aggregation, and examples.

Provision the data source

Add the data source to a Grafana provisioning file. Use environment variables for per-environment values. Use the bare $VAR form for the API key so Grafana does not double-expand values that contain $:

apiVersion: 1

datasources:
- name: Foxglove
type: foxglovedev-foxglove-datasource
access: proxy
jsonData:
baseUrl: ${FOXGLOVE_API_BASE_URL}
projectId: ${FOXGLOVE_PROJECT_ID}
siteId: ${FOXGLOVE_SITE_ID}
queryHttpTimeoutSeconds: 60
secureJsonData:
apiKey: $FOXGLOVE_API_KEY

Omit queryHttpTimeoutSeconds to use Grafana's HTTP client timeout. Omit baseUrl to use https://api.foxglove.dev.