Type to search.

Grafana connector

Serverless Preview

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Preview

    This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack Planned

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Planned

    We plan to add this functionality in a future Elastic Stack update. Subject to changes.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

The Grafana connector connects directly to the Grafana HTTP API. It lets a workflow or agent read Grafana-managed alerts and rules, manage silences, post dashboard annotations, and search dashboards and notification configuration, for both self-hosted Grafana and Grafana Cloud.

You can use this connector in Agent Builder and Workflows.

The Grafana connector uses Grafana's REST API with Bearer token (service account) authentication. You configure your Grafana instance URL, an optional organization ID (for multi-org instances), and a service account token when creating the connector.

You can create a Grafana connector in Stack Management > Connectors.

Grafana instance URL
The base URL of your Grafana instance, for example https://your-stack.grafana.net (Grafana Cloud) or https://grafana.example.com (self-hosted).
Organization ID
Optional. Sent as the X-Grafana-Org-Id header on every request. Leave empty to use the token's default organization.
Authentication
Bearer token. Use a Grafana service account token (Administration > Users and access > Service accounts). Grafana Cloud tokens are typically prefixed glsa_.
Action Description
getAlerts Fetch firing, pending, silenced, and inhibited alerts from Grafana-managed Alertmanager. Parameters: active, silenced, inhibited.
listRules List all configured alert rules.
getAlertRule Get a single alert rule by UID. Parameters: uid (required).
listSilences List active and pending silences.
getSilence Get a single silence by ID. Parameters: silenceId (required).
createSilence Mute alerts matching label matchers for a time window. Parameters: matchers, startsAt, endsAt, comment, createdBy (all required).
deleteSilence Expire a silence so matching alerts can fire again. Parameters: silenceId (required).
listAnnotations List annotations, filterable by dashboard, tags, and time range. Parameters: dashboardUID, tags, from, to, limit.
createAnnotation Post a dashboard annotation. Parameters: text (required), dashboardUID, panelId, time, timeEnd, tags.
updateAnnotation Update an existing annotation's text, tags, or time range. Parameters: annotationId (required), text, tags, time, timeEnd.
deleteAnnotation Delete an annotation. Parameters: annotationId (required).
searchDashboards Search dashboards and folders by query or tag. Parameters: query, tag, type, starred, limit, page.
getDashboard Get a dashboard by UID. Parameters: uid (required).
listContactPoints List configured contact points (notification targets). Parameters: name.
listMuteTimings List recurring silence schedules.
getNotificationPolicyTree Read the notification policy routing tree.

Use the Action configuration settings to customize connector networking, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use xpack.actions.customHostSettings to set per-host configurations. For a self-hosted Grafana instance, this instance must be network-reachable from Kibana.

  1. Log in to your Grafana instance.
  2. Go to Administration > Users and access > Service accounts.
  3. Create a service account and assign it the RBAC roles/permissions it needs, for example alert.instances:read, alert.instances:create (silences), alert.rules:read (rules), annotations:read, annotations:write, annotations:delete, and dashboards:read.
  4. Add a service account token and copy it.
  5. When configuring the connector, enter the token as the Bearer token, and your Grafana instance URL (and organization ID, if applicable) in the connector configuration fields.