Skip to content

Grafana integration

Connecting Grafana lets DXDT read your dashboards, panels, datasources, folders, alert rules and annotations, and run datasource queries for context. The integration is strictly read-only.

Setup time ~6 minutes
Difficulty Easy

Access required: Admin or Editor, to create a Viewer-scoped service account token

Prerequisites

  • Your Grafana base URL (Grafana Cloud or self-hosted)
  • Permission to create a service account or API key in Grafana

Setup

1. Determine your Grafana URL

DXDT needs the base URL of your Grafana instance. For Grafana Cloud this looks like https://<your-stack>.grafana.net. For self-hosted Grafana it is your own host, e.g. https://grafana.internal.example.com (include the port and any path prefix if you use one).

Note

Self-hosted instances must be reachable from DXDT's network; ensure the URL is publicly resolvable or allow-listed.

2. Create a Viewer service account

In Grafana, go to Administration > Users and access > Service accounts and click Add service account. Give it a name like dxdt-readonly and set its role to Viewer.

Note

Choose Viewer, never Editor or Admin — DXDT only reads and never modifies dashboards, alerts or datasources.

3. Generate a service account token

Open the new service account and click Add service account token, name it, and click Generate token. Copy the token immediately (it is shown only once).

  • On older Grafana versions use Configuration > API Keys and create a key with the Viewer role instead.
  • Store the token securely; you cannot retrieve it again after closing the dialog.

Configuration fields

Field Where to find it
Grafana API Key / Service Account Token (api_key) The Viewer service account token (or legacy Viewer API key). Sent as a Bearer token.
Grafana URL (grafana_url) Your instance base URL, e.g. https://your-stack.grafana.net (Cloud) or https://grafana.internal.example.com (self-hosted). https:// is added automatically if omitted; trailing slashes are trimmed.

Verify the connection

Enter both values in the Grafana plugin's Configuration tab and click Install & Configure; the Live Status panel should show a healthy connection to your Grafana instance.

Security

Your Grafana token and URL are stored encrypted per-tenant and are used only for read-only Grafana API operations.

Troubleshooting

Grafana URL not provided or connection refused

The URL is missing, malformed, or the instance is not reachable from DXDT. Provide the full base URL and confirm the host is publicly reachable or allow-listed.

401 Unauthorized

The token is invalid, expired, or was created without the Viewer role. Regenerate a Viewer service account token and re-save the configuration.

403 Forbidden on dashboards or datasources

The service account's role or folder permissions exclude the resources being read. Ensure the service account has Viewer access to the folders and datasources you want DXDT to see.


Vendor documentation: https://grafana.com/docs/grafana/latest/administration/service-accounts/