Grafana
Let hires find dashboards, read and run their panels, query your data sources, see Grafana's alerts, and mark deploys and incidents with annotations.
Explore 8 actions and their permissionsExact inputs, sign-in scopes, access limits and approval rules.
With Grafana (open source; Grafana Cloud or your own), a hire can:
- find dashboards by name or tag, and read one: its variables, its panels, and each panel's queries,
- run a panel for a time range and get the numbers: each series' minimum, maximum, average and latest value with a few points across the range, or a table's rows,
- write its own query for a data source: PromQL for Prometheus, LogQL for Loki, SQL for MySQL, PostgreSQL or SQL Server,
- see which of Grafana's alerts are firing,
- read annotations and add one, e.g. "deployed v42" or "incident started", so people see it on the graphs.
1. Make a service account token in Grafana
Straight there: https://<your-grafana>/org/serviceaccounts/create. Once you've typed your Grafana's address in Roster, the form links to it for you.
- In Grafana, open Administration → Users and access → Service accounts and click Add
service account. Name it
Roster. - Role: Viewer for hires that only read. Editor if hires should add annotations.
- Click Add service account token, then copy the token (it starts with
glsa_).
What hires do shows in Grafana as this service account.
2. Connect it in Roster
- Open Integrations → Tools → Add a tool, search for Grafana and choose it.
- Service account token: paste the token.
- Grafana address: your Grafana Cloud stack's address, like
https://acme.grafana.net, or your own Grafana's. - Click Connect.
Roster checks the key when you click Connect. If what you paste doesn't look like a key (service account tokens start with glsa_), the form says so straight away. Once it's accepted, the connection shows Connected as your Grafana organisation's name. If it's refused, Roster says what to fix (a mistyped key, a missing permission) and saves nothing.
3. Give hires access
On the hire's Tools tab, click Give access on Grafana:
- Read only: everything above except adding annotations.
- Read and write: it can also add annotations.
- Folders: folder names or UIDs, one per line. Folders inside them are included; use
Generalfor dashboards that aren't in a folder. The hire only sees, runs and annotates dashboards in these folders, and only sees alerts whose rules live in them. Leave it empty for every folder the token can see. - Data sources: the data sources the hire may write its own queries for. Leave it empty for all. Panels on dashboards the hire can use always run, since you've allowed the dashboard.
- Hold Prometheus queries to label and Allowed values (optional): e.g.
namespacewithshop. Every Prometheus query the hire runs, its own or a panel's, only sees series with one of those values. Queries to other kinds of data source are then refused, because Roster can't hold them to a label.
Dashboard variables
When a hire runs a panel, the dashboard's variables take their current values unless the hire
gives others (namespace = checkout). "All" means everything.
Personal data in logs
Log lines from Loki come back with email addresses, IP addresses and anything that looks like a token replaced.
Watching for alerts
A hire's responsibility can watch Grafana: it's woken when one of Grafana's alerts starts firing in its folders (silenced ones left out), with the alert and its summary.
If something goes wrong
- "Didn't accept the connection's credential": the token was deleted or has expired.
- "Doesn't allow this": the service account's role is too low, often Viewer when a hire tried to add an annotation.
- A panel shows "no data": try a longer time range, or give the panel's variables values.
Tools and permissions reference
This reference is built from the same definitions Roster uses to connect Grafana and give hires access. It updates with each release.
Authentication and requested permissions
The account or app you connect sets the outer limit. Each hire's access can narrow it further. Connecting a tool gives it to no hire until you give access on that hire's Tools tab.
API key or access token
In Grafana: Administration → Users and access → Service accounts → Add, role Viewer (Editor to add annotations), then Add service account token.
When making a key, use these permissions from the connection guide:
- Viewer (Editor to add annotations)
Connection fields
| Field | What to provide |
|---|---|
Service account tokentokenRequired · sealed secret | In Grafana: Administration → Users and access → Service accounts → Add, role Viewer (Editor to add annotations), then Add service account token. |
Grafana addressurlRequired | Your Grafana Cloud stack's address, or your own Grafana's. |
Per-hire limits
Read-only hires receive only actions that read. Read-and-write access also allows actions that change things, where the connection itself permits them. An empty resource allowlist usually means everything the connected account can reach; each field below explains its meaning.
| Field | What to provide |
|---|---|
FoldersfoldersOptional | Folder names or UIDs, one per line ("General" for dashboards outside any folder). Subfolders are included. Leave empty for every folder the token can see. |
Data sourcesdatasourcesOptional | Data sources the hire may write its own queries for, by name or UID. Leave empty for every one the token can see. Panels of allowed dashboards always run. |
Hold Prometheus queries to labelscopeLabelOptional | Optional: a label every Prometheus series the hire queries must have, with one of the values below. Queries to other kinds of data source are then refused. |
Allowed valuesscopeValuesOptional | Values of that label, one per line. |
Actions
8 actions: 7 only read and 1 change something. A read action may still need approval when your workspace or hire is set to ask. A locked approval requirement always applies.
8 of 8 actions. Open an action for its arguments and full input schema.
search_dashboardsRead only
Find dashboards by words in their title, or by tag.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
queryOptional | string | See input schema below.Default: "" |
tagOptional | string | See input schema below. |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"query": {
"default": "",
"type": "string",
"maxLength": 200
},
"tag": {
"type": "string",
"maxLength": 100
}
}
}get_dashboardRead only
A dashboard's variables and panels, with each panel's data source and queries.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
dashboardRequired | string | the dashboard's UID, from search_dashboards |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dashboard": {
"type": "string",
"description": "the dashboard's UID, from search_dashboards"
}
},
"required": [
"dashboard"
]
}run_panelRead only
Run a dashboard panel's queries for a time range and get the numbers (series summarised, tables as rows). Give variable values to override the dashboard's.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
dashboardRequired | string | the dashboard's UID, from search_dashboards |
panelRequired | integer | the panel's id, from get_dashboard |
fromOptional | string | start: "now-6h", "now-7d" or an ISO timeDefault: "now-1h" |
toOptional | string | end: "now" or an ISO timeDefault: "now" |
variablesOptional | object | See input schema below.Default: {} |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dashboard": {
"type": "string",
"description": "the dashboard's UID, from search_dashboards"
},
"panel": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "the panel's id, from get_dashboard"
},
"from": {
"default": "now-1h",
"description": "start: \"now-6h\", \"now-7d\" or an ISO time",
"type": "string"
},
"to": {
"default": "now",
"description": "end: \"now\" or an ISO time",
"type": "string"
},
"variables": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^\\w{1,100}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"dashboard",
"panel"
]
}query_datasourceRead only
Run your own query against a data source: PromQL for Prometheus, LogQL for Loki, SQL for MySQL, PostgreSQL or SQL Server. Series come back summarised, tables and log lines as rows.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
datasourceRequired | string | the data source's name or UID, from list_datasources |
queryRequired | string | See input schema below. |
fromOptional | string | start: "now-6h", "now-7d" or an ISO timeDefault: "now-1h" |
toOptional | string | end: "now" or an ISO timeDefault: "now" |
instantOptional | boolean | Prometheus: one value per series at the end timeDefault: false |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"datasource": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "the data source's name or UID, from list_datasources"
},
"query": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"from": {
"default": "now-1h",
"description": "start: \"now-6h\", \"now-7d\" or an ISO time",
"type": "string"
},
"to": {
"default": "now",
"description": "end: \"now\" or an ISO time",
"type": "string"
},
"instant": {
"default": false,
"description": "Prometheus: one value per series at the end time",
"type": "boolean"
}
},
"required": [
"datasource",
"query"
]
}list_datasourcesRead only
The data sources this hire can query, with their kind.
Approval: Uses your workspace and hire approval settings.
This action takes no arguments.
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {}
}list_alertsRead only
Grafana's alerts firing now, with their labels and summary.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
include_silencedOptional | boolean | See input schema below.Default: false |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"include_silenced": {
"default": false,
"type": "boolean"
}
}
}list_annotationsRead only
Annotations (deploys, incidents, notes people left) on a dashboard, or across allowed dashboards, in a time range.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
dashboardOptional | string | the dashboard's UID, from search_dashboards |
fromOptional | string | start: "now-7d" or an ISO timeDefault: "now-7d" |
toOptional | string | end: "now" or an ISO timeDefault: "now" |
tagsOptional | string[] | See input schema below.Default: [] |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dashboard": {
"type": "string",
"description": "the dashboard's UID, from search_dashboards"
},
"from": {
"default": "now-7d",
"description": "start: \"now-7d\" or an ISO time",
"type": "string"
},
"to": {
"default": "now",
"description": "end: \"now\" or an ISO time",
"type": "string"
},
"tags": {
"default": [],
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
}
}
}
}create_annotationRead and write
Mark a moment (or a period) on a dashboard with a note people will see on its graphs, e.g. a deploy or the start of an incident.
Approval: Uses your workspace and hire approval settings.
| Argument | Type | Details |
|---|---|---|
dashboardOptional | string | the dashboard's UID; leave out for a note on every dashboard |
panelOptional | integer | a panel's id, to mark only that panel |
textRequired | string | See input schema below. |
tagsOptional | string[] | See input schema below.Default: [] |
timeOptional | string | "now" or an ISO timeDefault: "now" |
endOptional | string | an ISO time, to mark a period |
Full input schema (JSON)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dashboard": {
"description": "the dashboard's UID; leave out for a note on every dashboard",
"type": "string"
},
"panel": {
"description": "a panel's id, to mark only that panel",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"tags": {
"default": [],
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
}
},
"time": {
"default": "now",
"description": "\"now\" or an ISO time",
"type": "string"
},
"end": {
"description": "an ISO time, to mark a period",
"type": "string"
}
},
"required": [
"text"
]
}Watches and incoming events
- This integration supports a responsibility that watches for changes. The guide above explains what it checks and how to limit it.
- No incoming webhook handler is declared for this integration.
Limits and troubleshooting
- Permission errors: check both the connected account's rights and the hire's resource and read/write limits.
- Expired or revoked access: reconnect or replace the key on the connection.
- Rate limits and unavailable services can interrupt work. The hire's timecard records the outcome.
- The action schema describes accepted inputs. It does not grant additional access or bypass approvals.