Grafana
Connect Grafana with a service account token. All actions are reads.
Grafana is under Code and issues. It works with Grafana Cloud and with a Grafana you host yourself. You connect it with a service account token, so there is no sign-in page to go through.
Create a token in Grafana
- In Grafana, open Administration → Users and access → Service accounts.
- Click Add service account and give it the Viewer role. To use the query actions, also let it read datasources.
- Open the new service account and click Add service account token. Copy the token. It starts with
glsa_.
The token acts as that service account. It never expires unless you set an expiry, and you can revoke it on the same page.
Connect
- Open Connected tools → Grafana → Connect.
- Choose Personal or Workspace. Only admins can pick Workspace.
- Keep Service account token as the sign-in method and click Continue.
- Enter the Grafana URL and paste the Service account token, then click Connect.
The Grafana URL is the address you open Grafana at, with nothing after it. Grafana Cloud stacks look like https://your-stack.grafana.net. A Grafana served under a path, such as https://example.com/grafana, is not supported.
What Stedia can do
- Search dashboards: find dashboards by title or tag, with a link to open each one.
- Get dashboard: read a dashboard's panels, their datasources and the queries behind them.
- List datasources: see which datasources are set up in Grafana.
- Query Prometheus: run a metrics query, for the current value or over a period of time.
- Query Loki logs: find log lines that match a query, newest first.
- List firing alerts: see which alerts are firing right now, with severity and summary.
You don't need to know the query language. Ask about a service or a dashboard by name, and Stedia reads the dashboard first to find the right datasource and query.
Example prompts
Type one into a chat, or use it as a schedule's task.
- "Which Grafana alerts are firing right now, and since when?"
- "Find the dashboard for the web shop and explain what each panel shows."
- "Search the Loki logs of the checkout service for errors in the last hour and group them by message."
Approvals
Every Grafana action is a read. Nothing on this tool asks for approval. Stedia cannot edit dashboards, change alert rules or silence alerts.
Limits
- Only Prometheus and Loki datasources can be queried.
- A query covers the last hour unless you name another period.
- A query returns at most 1,000 rows or log lines. The alert list returns at most 200 alerts.
Provider docs
- Grafana service accounts: how to create, limit and revoke the token.