Docs / Workflows / Integrations / Grafana
Grafana
Read alerting configuration and dashboards, query logs, metrics and traces, and manage alert silences.
What you can do
Each Grafana integration’s page in OAIZ shows these uses, with its events and its read and write actions, under What you can do with Grafana.
- Alert explanations
- Explain each firing alert with recent logs and metrics.
- Maintenance silences
- Silence alerts during planned maintenance.
- Deployment markers
- Mark each deployment on your dashboards.
Connection scope
A connection uses a Grafana instance and its configured credentials. Data source UIDs select Loki, a Prometheus-compatible service such as Mimir, or Tempo. Dashboard UIDs and panel IDs identify the visual context associated with an alert.
Connecting
Enter the Grafana stack’s HTTPS base URL and a service account token with the Editor role. Create the service account and token in Grafana’s Administration settings, under Users and access, then Service accounts. The base URL is the stack address, without an /api suffix.
The token needs access to the dashboards and data sources the workflows will read. Editor access also lets OAIZ create its alert webhook contact point and run the write actions below.
Read actions
- List Alert Rules
- List provisioned alert rules with summaries.
- Get Alert Rule
- Get one alert rule by UID.
- List Contact Points
- List webhook contact points and whether each one targets OAIZ.
- List Notification Policy
- Read the notification policy’s alert-routing tree.
- List Mute Timings
- List alert notification mute timings with time interval summaries.
- Get Mute Timing
- Get one alert notification mute timing by name.
- List Silences
- List active and pending Grafana Alerting silences with summaries.
- List Folders
- List Grafana folders with UIDs and titles.
- Get Folder
- Get one Grafana folder by UID.
- List Annotations
- List Grafana annotations, optionally filtered by dashboard UID.
- List Datasources
- List data sources with their IDs, names and types.
- Get Datasource
- Read one data source’s configuration summary.
- Check Datasource Health
- Check the health of a selected data source.
- Search Loki Logs
- Read logs matching a LogQL stream query, with a cursor for additional results.
- Search Loki Metrics
- Read counts, rates or trends from a LogQL metric query, at one time or across a time range.
- Search Mimir Metrics
- Run a PromQL query through a Prometheus-compatible data source.
- Search Tempo Traces
- Find traces using TraceQL or tags through a Tempo data source.
- Get Tempo Trace
- Read a trace summary by trace ID and data source UID.
- List Loki Labels
- List Loki label names for a Loki data source UID.
- List Loki Label Values
- List values for one Loki label through a Loki data source UID.
- List Mimir Labels
- List Prometheus-compatible metric label names for a metrics data source UID.
- List Mimir Label Values
- List values for one Prometheus-compatible metric label through a metrics data source UID.
- List Tempo Tags
- List Tempo tag names for a Tempo data source UID.
- List Tempo Tag Values
- List values for one Tempo tag through a Tempo data source UID.
- Search Dashboards
- Find dashboards by title query, folder, tag or starred state.
- Get Dashboard
- Read a dashboard summary with its panel references.
- List Dashboard Panels
- Read a dashboard’s panel summaries.
- Get Dashboard Panel
- Read a panel summary by dashboard UID and panel ID.
Write actions
- Create Silence
- Silence alerts matching supplied labels between explicit start and end times.
- Expire Silence
- Expire an active Grafana Alerting silence by ID.
- Create Annotation
- Add a timestamped chart annotation with text, tags and optional dashboard or panel context.
Events
Grafana alert notifications publish alert events. Labels and annotations provide rule and service context, and dashboard or panel URLs can identify where the alert is shown.