Grafana alerts, Prometheus/Mimir metrics, Loki logs, and Tempo traces.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect Grafana to give Struct Agent access to alerts and the configured Prometheus or Mimir, Loki and Tempo sources. Verify the sources required for the requested job.Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.Inspect
Inspect access and existing connections
Use a claimed workspace with permission to configure connections.Connect with the CLI
Supply credentials from approved secret storage throughGRAFANA_TOKEN. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.Replace example values with the intended resource:Verify and recover
Use the returned connection ID:ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.What Struct reads
Grafana alert rules, their state and their state history (when each alert fired), plus Prometheus or Mimir metrics, Loki logs, and Tempo traces through the data sources you select.What Struct writes
With Auto Monitors on, Struct creates and maintains its own alert rules in its folder, plus the contact point and notification policy that send their alerts back to Struct.Permissions
Use a Grafana service account token that can read and query the data sources you select. Auto Monitors also needs alert rule, contact point and notification policy access in Struct’s folder; Struct checks each action after you connect.Data sources
Find and query the data sources you select.Alert history
Lets investigations see when alerts fired: read Grafana’s alert state history (when each alert went pending, firing and back to normal). Only needed for that; Grafana’s Viewer role includes it. Needs alert state history turned on in Grafana.Manage alerting
Create and maintain Struct’s alert rules in its folder, plus the contact point and notification policy that send their alerts back to Struct.Mimir or Loki ruler
Only if you choose a Mimir or Loki ruler for Struct’s rules.Permissions:alert.rules.external:read, alert.rules.external:write.External Alertmanager
Only if you use an external Alertmanager.Permissions:alert.notifications.external:read, alert.notifications.external:write, alert.instances.external:read, alert.instances.external:write.Grafana Cloud data source credentials
Only needed on Grafana Cloud: the credentials behind each data source are separate from the service account and need these access-policy scopes, depending on the sources you select.Scopes:metrics:read, logs:read, traces:read, rules:read, alerts:read.Grafana Cloud ruler and Alertmanager writes
On Grafana Cloud, only if you choose a Mimir or Loki ruler for Struct’s rules or use an external Alertmanager: the credentials behind those data sources also need these scopes.Scopes:rules:write, alerts:write.- Grafana authorizes each request by fine-grained action and resource, so role names alone don’t decide what works. Struct checks every action against the exact folder, data source and contact point it uses, and the Auto Monitors page lists anything missing. Struct’s own acceptance tests run with Grafana’s built-in Editor and Admin roles.
- On Grafana 12, alerting provisioning access can stand in for the rule, contact point and notification policy actions:
alert.provisioning:readandalert.provisioning:write, or the rule- and notification-specific provisioning actions. - Grafana-managed alert rules need the organization’s Alertmanager setting to be internal. Struct does not change it, and refuses to create rules while alerts are also sent to external Alertmanagers.
How to grant
Create a service account token. In Grafana, open Administration → Users and access → Service accounts, create a service account with every permission above, including the optional ruler and Alertmanager actions, and add a token.Grafana Cloud data source credentials. On Grafana Cloud, give the access policy behind each data source’s credentials these scopes:metrics:read, logs:read, traces:read, rules:read, rules:write, alerts:read, alerts:write.Permission catalog version 2026-11-04.1. See permission changes.