Skip to content

Grafana

Connect Grafana alerts, alert rules, dashboards, annotations, silences, and data queries to SuperPlane workflows

Setup steps:

  1. In Grafana, go to Administration → Users and access → Service Accounts, select Add service account.

    Service Account Role:
    While naming the service account, go to Roles → Basic roles and select Admin.

    Navigate to the created service account and select Add service account token. Name it and set an expiration period then click Generate token. This is your Service Account Token.

  2. Use your Grafana root URL as Base URL (for example https://grafana.example.com).

  3. Fill in Base URL and Service Account Token below, then save.

The On Alert Firing trigger starts a workflow when Grafana Unified Alerting sends a firing alert webhook.

  1. SuperPlane automatically creates or updates a Grafana Webhook contact point and notification policy route for this trigger when provisioning succeeds.
  2. SuperPlane manages webhook bearer authentication automatically.
  3. Provisioning requires a Grafana integration with Base URL and Service Account Token and sufficient permissions for alerting and provisioning APIs.
  • Alert Names: Optional exact alert name filters

The trigger emits the full Grafana webhook payload, including:

  • status (firing/resolved)
  • alerts array with labels and annotations
  • groupLabels, commonLabels, commonAnnotations
  • externalURL and other alerting metadata
{
"data": {
"alerts": [
{
"annotations": {
"summary": "Error rate above threshold"
},
"labels": {
"alertname": "HighErrorRate",
"service": "api"
},
"status": "firing"
}
],
"commonLabels": {
"alertname": "HighErrorRate"
},
"externalURL": "http://grafana.local",
"ruleUid": "alert_rule_uid",
"status": "firing",
"title": "High error rate"
},
"timestamp": "2026-02-12T16:18:03.362582388Z",
"type": "grafana.alert.firing"
}

The Create Alert Rule component creates a Grafana-managed alert rule using the Alerting Provisioning HTTP API.

  • Monitoring onboarding: create baseline alerts when a new service or environment is provisioned
  • Incident automation: create temporary alert rules during an incident or validation workflow
  • Policy rollout: standardize alert coverage across teams using a shared rule definition
  • Title: Human-readable alert name shown in Grafana
  • Folder: Existing Grafana folder that should contain the rule
  • Rule Group: Grafana rule group to create the rule in
  • Data Source: Existing Grafana data source the query should use
  • Query: Expression Grafana evaluates when checking the alert
  • Lookback Window: How far back to query when evaluating the rule
  • Reducer / Condition / Threshold(s): How the series is reduced, how it is compared to thresholds, and optional upper bound for range conditions
  • For: How long the condition must hold before firing
  • No Data / Execution Error State: Grafana behavior when the query returns no data or errors
  • Contact Point: Optional Grafana contact point for notifications when the rule fires
  • Labels / Annotations: Optional routing and context metadata attached to the rule
  • Paused: Whether the rule starts paused

Returns the created Grafana alert rule object, including identifiers and evaluation metadata.

{
"data": {
"annotations": {
"summary": "High error rate detected"
},
"condition": "C",
"data": [
{
"datasourceUid": "prometheus-main",
"model": {
"editorMode": "code",
"expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"intervalMs": 1000,
"maxDataPoints": 43200,
"query": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"refId": "A"
},
"queryType": "",
"refId": "A",
"relativeTimeRange": {
"from": 300,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"expression": "A",
"id": "reduce",
"reducer": "last",
"refId": "B",
"settings": {
"mode": "dropNN"
},
"type": "reduce"
},
"queryType": "",
"refId": "B",
"relativeTimeRange": {
"from": 0,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"C"
]
},
"reducer": {
"type": "last"
},
"type": "query"
}
],
"expression": "B",
"id": "threshold",
"refId": "C",
"type": "threshold"
},
"queryType": "",
"refId": "C",
"relativeTimeRange": {
"from": 0,
"to": 0
}
}
],
"execErrState": "Alerting",
"folderUID": "infra",
"for": "5m",
"id": 42,
"isPaused": false,
"labels": {
"service": "api",
"severity": "critical"
},
"noDataState": "NoData",
"orgID": 1,
"ruleGroup": "service-health",
"title": "High error rate",
"uid": "cergr5pm79hj4d",
"updated": "2026-03-31T10:20:30Z"
},
"timestamp": "2026-03-31T10:20:30Z",
"type": "grafana.alertRule"
}

The Create Annotation component writes an annotation into Grafana, marking operational events on dashboard timelines.

  • Deploy tracking: Annotate graphs at the exact moment a deployment is triggered or completes
  • Incident markers: Place a marker when an incident is opened or resolved for post-incident correlation
  • Maintenance windows: Mark the start and end of a maintenance window as a region annotation
  • Change correlation: Record configuration changes, feature flag toggles, or rollbacks directly on the timeline
  • Dashboard: Optional — choose a dashboard from your Grafana instance to scope the annotation
  • Panel: Required — choose the panel within the selected dashboard to attach the annotation to
  • Text: The annotation message (required)
  • Tags: Optional list of tags to label the annotation (e.g. deploy, rollback, incident)
  • Time: Optional start time value. Examples: {{ now() }} or {{ now() - duration("5m") }}
  • Time End: Optional end time value for a region annotation. Examples: {{ now() }} or {{ now() + duration("24h") }}

Returns the ID of the newly created annotation.

{
"data": {
"id": 42,
"url": "https://grafana.example.com/d/production-overview/production-overview?from=1739376783362\u0026to=1739377383362"
},
"timestamp": "2026-02-12T16:18:03.362582388Z",
"type": "grafana.annotation.created"
}

The Create Silence component creates a new Alertmanager silence in Grafana, suppressing alert notifications that match the configured matchers during the specified time window.

  • Deploy window: Suppress noisy alerts during a planned maintenance or deployment window
  • Incident management: Prevent alert storms from flooding on-call channels while an incident is being worked on
  • Testing: Silence alerts during load tests or chaos experiments
  • Matchers: One or more label matchers that identify which alerts to silence (required). Each matcher uses an operator: equal (=), not equal (!=), regex match (=), or regex does not match (!), matching Grafana Alertmanager semantics.
  • Starts At: The start of the silence window (required)
  • Ends At: The end of the silence window (required)
  • Comment: A description of why the silence is being created (required)
    • The createdBy field sent to Grafana is set automatically to SuperPlane-<org_name> and is not configurable

Returns the ID of the newly created silence.

{
"data": {
"endsAt": "2026-04-01T10:24:30Z",
"silenceId": "a3e5c2d1-8b4f-4e1a-9c7d-2f0e6b3a1d5c",
"startsAt": "2026-03-31T10:24:30Z"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.silence.created"
}

The Delete Alert Rule component deletes a Grafana-managed alert rule using the Alerting Provisioning HTTP API.

  • Alert cleanup: remove temporary or obsolete rules after a rollout or incident
  • Service retirement: delete rules that are no longer needed when an environment is decommissioned
  • Controlled cleanup: pair deletions with approvals, notifications, or audit workflows
  • Alert Rule: The Grafana alert rule to delete

Returns a confirmation object with the deleted alert rule UID, title, and deletion status.

{
"data": {
"deleted": true,
"title": "High error rate",
"uid": "cergr5pm79hj4d"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.alertRuleDeleted"
}

The Delete Annotation component removes an annotation from Grafana by ID.

  • Cleanup incorrect markers: Remove an annotation that was created with wrong text or tags
  • Automated lifecycle: Delete temporary markers (e.g. maintenance window start) once the event is complete
  • Idempotent workflows: Allow re-runs to clean up previously created annotations before re-creating them
  • Annotation: The annotation to delete, chosen from your Grafana instance (required)

Returns the annotation ID and a confirmation that the annotation was deleted.

{
"data": {
"deleted": true,
"id": 42
},
"timestamp": "2026-02-12T16:18:03.362582388Z",
"type": "grafana.annotation.deleted"
}

The Delete Silence component expires an existing silence in Grafana Alertmanager.

  • End a maintenance window early: Remove a silence once deployment or maintenance completes ahead of schedule
  • Automated cleanup: Expire silences created by automation after the condition they covered has resolved
  • Silence: The silence to expire (required)

Returns the silence ID and a confirmation that the silence was deleted.

{
"data": {
"deleted": true,
"silenceId": "a3e5c2d1-8b4f-4e1a-9c7d-2f0e6b3a1d5c"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.silence.deleted"
}

The Get Alert Rule component fetches a Grafana-managed alert rule using the Alerting Provisioning HTTP API.

  • Configuration review: inspect the current source of truth before changing a rule
  • Workflow enrichment: include alert rule details in notifications, tickets, or approvals
  • Drift checks: compare the current Grafana rule against an expected configuration
  • Alert Rule: The Grafana alert rule to retrieve

Returns the full Grafana alert rule object, including title, folder, group, condition, queries, labels, and annotations.

{
"data": {
"annotations": {
"summary": "High error rate detected"
},
"condition": "C",
"data": [
{
"datasourceUid": "prometheus-main",
"model": {
"editorMode": "code",
"expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"intervalMs": 1000,
"maxDataPoints": 43200,
"query": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"refId": "A"
},
"queryType": "",
"refId": "A",
"relativeTimeRange": {
"from": 300,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"expression": "A",
"id": "reduce",
"reducer": "last",
"refId": "B",
"settings": {
"mode": "dropNN"
},
"type": "reduce"
},
"queryType": "",
"refId": "B",
"relativeTimeRange": {
"from": 0,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"C"
]
},
"reducer": {
"type": "last"
},
"type": "query"
}
],
"expression": "B",
"id": "threshold",
"refId": "C",
"type": "threshold"
},
"queryType": "",
"refId": "C",
"relativeTimeRange": {
"from": 0,
"to": 0
}
}
],
"execErrState": "Alerting",
"folderUID": "infra",
"for": "5m",
"id": 42,
"isPaused": false,
"labels": {
"service": "api",
"severity": "critical"
},
"noDataState": "NoData",
"orgID": 1,
"ruleGroup": "service-health",
"title": "High error rate",
"uid": "cergr5pm79hj4d",
"updated": "2026-03-31T10:20:30Z"
},
"timestamp": "2026-03-31T10:20:30Z",
"type": "grafana.alertRule"
}

The Get Dashboard component fetches a Grafana dashboard using the Grafana Dashboards HTTP API.

  • Dashboard inspection: retrieve current dashboard configuration for review or downstream use
  • Workflow enrichment: include dashboard details in notifications, tickets, or approvals
  • Panel discovery: list panels available in a dashboard for subsequent rendering or linking
  • Dashboard: The Grafana dashboard UID to retrieve

Returns the Grafana dashboard object, including title, slug, URL, folder, tags, and panel summaries.

{
"data": {
"folder": "fdg4m1rt63hj8q",
"folderTitle": "Platform",
"panels": [
{
"id": 1,
"title": "Request Rate",
"type": "timeseries"
},
{
"id": 2,
"title": "Error Rate",
"type": "timeseries"
},
{
"id": 3,
"title": "P99 Latency",
"type": "gauge"
}
],
"slug": "production-overview",
"tags": [
"production",
"platform"
],
"title": "Production Overview",
"uid": "cIBgcSjkk",
"url": "https://grafana.example.com/d/cIBgcSjkk/production-overview"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.dashboard"
}

The Get Silence component fetches the details of a single silence from Grafana Alertmanager using its ID.

  • Inspect a silence: Retrieve full details of a silence including state, comment, matchers, and times
  • Verify a silence: Confirm a silence is still active before taking action in a workflow
  • Silence: The silence to retrieve (required)

Returns the silence object including ID, state, comment, matchers, start/end times, and the author.

{
"data": {
"comment": "Deploy window for v2.1.0",
"createdBy": "devops-bot",
"endsAt": "2026-03-31T11:00:00.000Z",
"id": "a3e5c2d1-8b4f-4e1a-9c7d-2f0e6b3a1d5c",
"matchers": [
{
"isEqual": true,
"isRegex": false,
"name": "env",
"value": "production"
}
],
"startsAt": "2026-03-31T10:00:00.000Z",
"status": {
"state": "active"
},
"updatedAt": "2026-03-31T10:00:00.000Z"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.silence"
}

The List Alert Rules component lists Grafana-managed alert rules using the Alerting Provisioning HTTP API.

  • Alert audits: review which Grafana alert rules currently exist
  • Workflow enrichment: send alert inventories to Slack, Jira, or documentation steps
  • Follow-up automation: feed alert rule summaries into downstream review or cleanup workflows

All fields are optional:

  • Folder: When set, only alert rules in this Grafana folder are listed
  • Rule Group: When set, only rules in this Grafana rule group are listed

When both are omitted, the component lists alert rules across the instance (subject to Grafana permissions).

Returns an object containing the list of Grafana alert rule summaries, including each rule UID and title.

{
"data": {
"alertRules": [
{
"title": "High error rate",
"uid": "cergr5pm79hj4d"
},
{
"title": "High latency",
"uid": "aer9k2pm71sh2b"
},
{
"title": "Service unavailable",
"uid": "bfg4m1rt63hj8q"
}
]
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.alertRules"
}

The List Annotations component retrieves annotations from Grafana, optionally filtered by tag, dashboard, or time range.

  • Audit operational events: Review recent deploy, incident, or change markers on a timeline
  • Correlate incidents: Retrieve annotations from around an incident time window for post-incident analysis
  • Workflow branching: Check for existing markers before creating duplicate annotations
  • Dashboard: Optional — filter to annotations on a specific dashboard from your Grafana instance
  • Panel: Optional — filter to annotations on a specific panel within the selected dashboard
  • Text: Optional — filter annotations whose text contains this value
  • Tags: Filter to annotations matching all of the specified tags (optional)
  • From / To: Time range filter values (optional). Examples: {{ now() - duration("1h") }} and {{ now() }}
  • Limit: Maximum number of annotations to return (optional)

Returns a list of annotation objects including ID, text, tags, time, and dashboard/panel references.

{
"data": {
"annotations": [
{
"dashboardUID": "abc123",
"id": 42,
"panelId": 3,
"tags": [
"deploy",
"production"
],
"text": "Deploy v1.2.3 to production",
"time": 1739376000000,
"timeEnd": 1739376000000,
"type": "annotation"
},
{
"dashboardUID": "abc123",
"id": 41,
"panelId": 3,
"tags": [
"rollback",
"production"
],
"text": "Rollback to v1.2.2",
"time": 1739289600000,
"timeEnd": 1739289600000,
"type": "annotation"
}
],
"from": "2026-02-12T15:18:03.362582388Z",
"to": "2026-02-12T16:18:03.362582388Z"
},
"timestamp": "2026-02-12T16:18:03.362582388Z",
"type": "grafana.annotations"
}

The List Silences component retrieves silences from Grafana Alertmanager.

  • Audit: Review all currently active or pending silences in your Grafana instance
  • Detect if already muted: Check whether a specific alert or label set is already silenced before creating a duplicate
  • Workflow logic: Branch on silence state — e.g. skip escalation if an alert is already silenced
  • Filter: Optional label matcher string to filter silences (e.g. alertname=~"High.*")

Returns a list of silence objects, each including ID, state, comment, matchers, start/end times, and the author.

{
"data": {
"silences": [
{
"comment": "Deploy window for v2.1.0",
"createdBy": "devops-bot",
"endsAt": "2026-03-31T11:00:00.000Z",
"id": "a3e5c2d1-8b4f-4e1a-9c7d-2f0e6b3a1d5c",
"matchers": [
{
"isEqual": true,
"isRegex": false,
"name": "env",
"value": "production"
}
],
"startsAt": "2026-03-31T10:00:00.000Z",
"status": {
"state": "active"
},
"updatedAt": "2026-03-31T10:00:00.000Z"
}
]
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.silences"
}

The Query Data Source component executes a query against a Grafana data source using the Grafana Query API.

  • Metrics investigation: Run PromQL or other datasource queries from workflows
  • Alert validation: Validate alert conditions before escalation
  • Incident context: Pull current metrics into incident workflows
  • Data Source: The Grafana data source to query
  • Query: The datasource query (PromQL, InfluxQL, etc.)
  • Time From / Time To: Optional expressions for the query range (for example now() - duration("5m") and now())
  • Timezone: Interprets datetime-local expression results using the selected timezone offset
  • If omitted, SuperPlane defaults the query to the last 5 minutes
  • Format: Optional query format (depends on the datasource)

Returns the Grafana query API response JSON.

{
"data": {
"results": {
"A": {
"frames": [
{
"data": {
"values": [
[
"2026-02-07T08:00:00Z",
"2026-02-07T08:01:00Z"
],
[
1,
1
]
]
},
"schema": {
"fields": [
{
"name": "time",
"type": "time"
},
{
"name": "value",
"type": "number"
}
]
}
}
]
}
}
},
"timestamp": "2026-02-12T16:18:03.362582388Z",
"type": "grafana.query.result"
}

The Render Panel component constructs a Grafana image render URL for a dashboard panel using the Grafana Image Renderer.

  • Incident snapshots: attach or link a rendered panel image in tickets or notifications
  • Scheduled reports: generate a reusable render URL for panel snapshots
  • Workflow enrichment: pass a compact panel image URL through workflow steps
  • Dashboard: The Grafana dashboard containing the panel to render
  • Panel: The panel to render
  • Width: Image width in pixels (default 1000)
  • Height: Image height in pixels (default 500)
  • From: Optional start of the time range. Examples: {{ now() - duration("1h") }} or now-1h
  • To: Optional end of the time range. Examples: {{ now() }} or now

Returns the Grafana render URL along with the dashboard UID and panel.

{
"data": {
"dashboard": "cIBgcSjkk",
"panel": 2,
"url": "https://grafana.example.com/render/d-solo/cIBgcSjkk/production-overview?panelId=2\u0026width=1000\u0026height=500\u0026tz=UTC"
},
"timestamp": "2026-03-31T10:24:30Z",
"type": "grafana.panel.image"
}

The Update Alert Rule component updates a Grafana-managed alert rule using the Alerting Provisioning HTTP API.

  • Threshold tuning: refine alert conditions after incidents or noisy periods
  • Ownership changes: update labels and annotations used for routing and context
  • Rollout safety: adjust alert rules during migrations or environment transitions
  • Alert Rule: The Grafana alert rule to update
  • All other fields are optional: only the values you provide will be changed
  • Folder / Rule Group: Optional location changes for the rule in Grafana
  • Data Source / Query: Optional query details Grafana evaluates
  • Lookback / Reducer / Condition / Threshold(s): Optional changes to evaluation and thresholds
  • Contact Point: Set to a contact point to attach notifications; clear the value to remove notification settings from the rule
  • Labels / Annotations: Optional metadata to update alongside the rule

Returns the updated Grafana alert rule object after the provisioning API applies the change.

{
"data": {
"annotations": {
"summary": "High error rate detected"
},
"condition": "C",
"data": [
{
"datasourceUid": "prometheus-main",
"model": {
"editorMode": "code",
"expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"intervalMs": 1000,
"maxDataPoints": 43200,
"query": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))",
"refId": "A"
},
"queryType": "",
"refId": "A",
"relativeTimeRange": {
"from": 300,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"expression": "A",
"id": "reduce",
"reducer": "last",
"refId": "B",
"settings": {
"mode": "dropNN"
},
"type": "reduce"
},
"queryType": "",
"refId": "B",
"relativeTimeRange": {
"from": 0,
"to": 0
}
},
{
"datasourceUid": "__expr__",
"model": {
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"C"
]
},
"reducer": {
"type": "last"
},
"type": "query"
}
],
"expression": "B",
"id": "threshold",
"refId": "C",
"type": "threshold"
},
"queryType": "",
"refId": "C",
"relativeTimeRange": {
"from": 0,
"to": 0
}
}
],
"execErrState": "Alerting",
"folderUID": "infra",
"for": "5m",
"id": 42,
"isPaused": false,
"labels": {
"service": "api",
"severity": "critical"
},
"noDataState": "NoData",
"orgID": 1,
"ruleGroup": "service-health",
"title": "High error rate",
"uid": "cergr5pm79hj4d",
"updated": "2026-03-31T10:20:30Z"
},
"timestamp": "2026-03-31T10:20:30Z",
"type": "grafana.alertRule"
}