Skip to main content
The Grafana integration gives sureops agents access to your Grafana instance for metric queries, log search, unified alert state, and dashboard context — all through a single MCP server. If you run the standard Grafana observability stack (Grafana + Prometheus + Loki), this is the recommended single-integration path.
The Grafana MCP connection covers Prometheus and Loki datasource queries. You do not need to connect Prometheus or Loki separately if they are already configured as Grafana datasources. However, if you use Tempo for distributed tracing, connect Tempo separately — the Grafana MCP does not expose Tempo’s full TraceQL surface.

What this integration enables

  • Metric queries — agents run PromQL against your Prometheus datasource via Grafana
  • Log search — agents run LogQL against your Loki datasource via Grafana
  • Unified alert state — agents can read Grafana-managed alert rules and their current state
  • Dashboard context — agents can reference your dashboards during diagnosis and in RCA documents

Prerequisites

  • An environment selected in the top-right context switcher — Settings → Environment → Integrations is scoped to that environment and stays disabled until one is selected
  • A running Grafana instance (self-hosted or Grafana Cloud)
  • Admin access to Grafana to create a service account
  • The grafana-mcp server running and reachable from sureops (see step 2 below)
Integration connections are per-environment. Connecting Grafana here only applies to the environment that was selected in the context switcher at the time — it does not carry over to your other environments. Repeat this connect flow for each environment that needs Grafana.

Setup

1

Generate a Service Account Token

In Grafana, go to Administration → Service accounts.Create a new service account. If you only need metric/log queries, dashboard context, and unified alert reads, the Viewer role is enough (unless your Grafana restricts data source permissions, in which case grant the service account access to the data sources it should query). If you plan to use Proposed Monitor Export (Growth plan and above) to push approved sureops monitors into Grafana as alert rules, Viewer is not enough — that push writes alert rules through Grafana’s provisioning API, so assign the service account the Editor role or above on Grafana 11 and later, or Admin (the alert.provisioning:write permission) on Grafana 9–10, or a custom role that grants alert.provisioning:write. Then click Add token to generate a service account token for that account.Copy the token; you’ll need it in the next step to configure grafana-mcp. It isn’t entered directly into sureops. Grafana only shows it once.
2

Stand up grafana-mcp

Run grafana-mcp pointed at your Grafana instance. If you’re using the sureops demo environment, grafana-mcp is already provisioned in-cluster — you can skip this step.For your own environment, deploy grafana-mcp with your Grafana URL and the service account token from step 1 as its upstream config — the repository documents both Docker and binary deployment.
3

Connect in sureops

In sureops, go to Settings → Environment → Integrations and click Connect next to Grafana.Fill in:
  • Integration Name — prefilled; change it if you need to tell two configurations of this integration apart
  • MCP Server Endpoint — the URL of your running grafana-mcp server
  • Bearer Token — the token your grafana-mcp endpoint (or the proxy in front of it) expects. sureops always sends this to grafana-mcp as an Authorization: Bearer header, so there is no authentication method to choose. The form won’t save a blank token, so if nothing in front of grafana-mcp checks a token, put it behind an ingress or proxy that does. This is not your Grafana service account token — that one goes to grafana-mcp only
Click Save & Connect.
4

Configure Org ID and Alert Folder UID (after connecting)

Once connected, reopen the Grafana integration from Settings → Environment → Integrations. A Settings section appears below the connection status with two additional fields you set post-connect:
  • Grafana Org ID — leave blank to use the org your grafana-mcp is configured for; set it only to override
  • Alert Folder UID — the folder alert rules are created in. Optional to connect, but required before you can push a Proposed Monitor — it’s the part of the folder’s URL after /dashboards/f/, or ask your Grafana admin
These aren’t part of the initial connect form — they’re configured afterward, once the integration shows as connected.On the sureops demo environment, sureops sets both during provisioning (alert rules go to the SureOps folder, UID sureops) and the settings show Managed by sureops, so you can skip this step. Don’t delete the SureOps folder: Grafana deletes the rules in it too, and sureops still shows those monitors as Pushed. If pushing a Proposed Monitor fails with “Grafana alert_folder_uid is not configured for this integration”, contact your sureops support contact.

Required credentials

Fields collected when you connect the integration: Fields configured afterward, via the integration’s Settings section once connected: The Service Account Token and Grafana URL from steps 1–2 are never entered into sureops — they configure grafana-mcp, which handles authentication to Grafana on sureops’ behalf.

Common errors


Official documentation