Grafana
Interact with Grafana dashboards, alerts, and annotations
Grafana is a leading open-source platform for monitoring, observability, and visualization. It allows users to query, visualize, alert on, and analyze data from a variety of sources, making it an essential tool for infrastructure and application monitoring.
With Grafana, you can:
- Visualize data: Build and customize dashboards to display metrics, logs, and traces in real time
- Monitor health and status: Check the health of your Grafana instance and connected data sources
- Manage alerts and annotations: Set up alert rules, manage notifications, and annotate dashboards with important events
- Organize content: Organize dashboards and data sources into folders for better access management
In Sim, the Grafana integration empowers your agents to interact directly with your Grafana instance via API, enabling actions such as:
- Checking the Grafana server, database, and data source health status
- Retrieving, listing, and managing dashboards, alert rules, annotations, data sources, and folders
- Automating the monitoring of your infrastructure by integrating Grafana data and alerts into your workflow automations
These capabilities enable Sim agents to monitor systems, proactively respond to alerts, and help ensure the reliability and visibility of your services — all as part of your automated workflows.
Integrate Grafana into workflows. Manage dashboards, alerts, annotations, data sources, folders, and monitor health status.
Get a dashboard by its UID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
dashboardUid | string | Yes | The UID of the dashboard to retrieve |
| Parameter | Type | Description |
|---|
dashboard | json | The full dashboard JSON object |
meta | json | Dashboard metadata (version, permissions, etc.) |
Search and list all dashboards
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
query | string | No | Search query to filter dashboards by title |
tag | string | No | Filter by tag (comma-separated for multiple tags) |
folderIds | string | No | Filter by folder IDs (comma-separated) |
starred | boolean | No | Only return starred dashboards |
limit | number | No | Maximum number of dashboards to return |
| Parameter | Type | Description |
|---|
dashboards | array | List of dashboard search results |
Create a new dashboard
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
title | string | Yes | The title of the new dashboard |
folderUid | string | No | The UID of the folder to create the dashboard in |
tags | string | No | Comma-separated list of tags |
timezone | string | No | Dashboard timezone (e.g., browser, utc) |
refresh | string | No | Auto-refresh interval (e.g., 5s, 1m, 5m) |
panels | string | No | JSON array of panel configurations |
overwrite | boolean | No | Overwrite existing dashboard with same title |
message | string | No | Commit message for the dashboard version |
| Parameter | Type | Description |
|---|
id | number | The numeric ID of the created dashboard |
uid | string | The UID of the created dashboard |
url | string | The URL path to the dashboard |
status | string | Status of the operation (success) |
version | number | The version number of the dashboard |
slug | string | URL-friendly slug of the dashboard |
Update an existing dashboard. Fetches the current dashboard and merges your changes.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
dashboardUid | string | Yes | The UID of the dashboard to update |
title | string | No | New title for the dashboard |
folderUid | string | No | New folder UID to move the dashboard to |
tags | string | No | Comma-separated list of new tags |
timezone | string | No | Dashboard timezone (e.g., browser, utc) |
refresh | string | No | Auto-refresh interval (e.g., 5s, 1m, 5m) |
panels | string | No | JSON array of panel configurations |
overwrite | boolean | No | Overwrite even if there is a version conflict |
message | string | No | Commit message for this version |
| Parameter | Type | Description |
|---|
id | number | The numeric ID of the updated dashboard |
uid | string | The UID of the updated dashboard |
url | string | The URL path to the dashboard |
status | string | Status of the operation (success) |
version | number | The new version number of the dashboard |
slug | string | URL-friendly slug of the dashboard |
Delete a dashboard by its UID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
dashboardUid | string | Yes | The UID of the dashboard to delete |
| Parameter | Type | Description |
|---|
title | string | The title of the deleted dashboard |
message | string | Confirmation message |
id | number | The ID of the deleted dashboard |
List all alert rules in the Grafana instance
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
| Parameter | Type | Description |
|---|
rules | array | List of alert rules |
Get a specific alert rule by its UID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
alertRuleUid | string | Yes | The UID of the alert rule to retrieve |
| Parameter | Type | Description |
|---|
uid | string | Alert rule UID |
title | string | Alert rule title |
condition | string | Alert condition |
data | json | Alert rule query data |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
noDataState | string | State when no data is returned |
execErrState | string | State on execution error |
annotations | json | Alert annotations |
labels | json | Alert labels |
Create a new alert rule
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
title | string | Yes | The title of the alert rule |
folderUid | string | Yes | The UID of the folder to create the alert in |
ruleGroup | string | Yes | The name of the rule group |
condition | string | Yes | The refId of the query or expression to use as the alert condition |
data | string | Yes | JSON array of query/expression data objects |
forDuration | string | No | Duration to wait before firing (e.g., 5m, 1h) |
noDataState | string | No | State when no data is returned (NoData, Alerting, OK) |
execErrState | string | No | State on execution error (Alerting, OK) |
annotations | string | No | JSON object of annotations |
labels | string | No | JSON object of labels |
| Parameter | Type | Description |
|---|
uid | string | The UID of the created alert rule |
title | string | Alert rule title |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
Update an existing alert rule. Fetches the current rule and merges your changes.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
alertRuleUid | string | Yes | The UID of the alert rule to update |
title | string | No | New title for the alert rule |
folderUid | string | No | New folder UID to move the alert to |
ruleGroup | string | No | New rule group name |
condition | string | No | New condition refId |
data | string | No | New JSON array of query/expression data objects |
forDuration | string | No | Duration to wait before firing (e.g., 5m, 1h) |
noDataState | string | No | State when no data is returned (NoData, Alerting, OK) |
execErrState | string | No | State on execution error (Alerting, OK) |
annotations | string | No | JSON object of annotations |
labels | string | No | JSON object of labels |
| Parameter | Type | Description |
|---|
uid | string | The UID of the updated alert rule |
title | string | Alert rule title |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
Delete an alert rule by its UID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
alertRuleUid | string | Yes | The UID of the alert rule to delete |
| Parameter | Type | Description |
|---|
message | string | Confirmation message |
List all alert notification contact points
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
| Parameter | Type | Description |
|---|
contactPoints | array | List of contact points |
Create an annotation on a dashboard or as a global annotation
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
text | string | Yes | The text content of the annotation |
tags | string | No | Comma-separated list of tags |
dashboardUid | string | No | UID of the dashboard to add the annotation to (optional for global annotations) |
panelId | number | No | ID of the panel to add the annotation to |
time | number | No | Start time in epoch milliseconds (defaults to now) |
timeEnd | number | No | End time in epoch milliseconds (for range annotations) |
| Parameter | Type | Description |
|---|
id | number | The ID of the created annotation |
message | string | Confirmation message |
Query annotations by time range, dashboard, or tags
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
from | number | No | Start time in epoch milliseconds |
to | number | No | End time in epoch milliseconds |
dashboardUid | string | No | Filter by dashboard UID |
panelId | number | No | Filter by panel ID |
tags | string | No | Comma-separated list of tags to filter by |
type | string | No | Filter by type (alert or annotation) |
limit | number | No | Maximum number of annotations to return |
| Parameter | Type | Description |
|---|
annotations | array | List of annotations |
Update an existing annotation
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
annotationId | number | Yes | The ID of the annotation to update |
text | string | Yes | New text content for the annotation |
tags | string | No | Comma-separated list of new tags |
time | number | No | New start time in epoch milliseconds |
timeEnd | number | No | New end time in epoch milliseconds |
| Parameter | Type | Description |
|---|
id | number | The ID of the updated annotation |
message | string | Confirmation message |
Delete an annotation by its ID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
annotationId | number | Yes | The ID of the annotation to delete |
| Parameter | Type | Description |
|---|
message | string | Confirmation message |
List all data sources configured in Grafana
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
| Parameter | Type | Description |
|---|
dataSources | array | List of data sources |
Get a data source by its ID or UID
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
dataSourceId | string | Yes | The ID or UID of the data source to retrieve |
| Parameter | Type | Description |
|---|
id | number | Data source ID |
uid | string | Data source UID |
name | string | Data source name |
type | string | Data source type |
url | string | Data source connection URL |
database | string | Database name (if applicable) |
isDefault | boolean | Whether this is the default data source |
jsonData | json | Additional data source configuration |
List all folders in Grafana
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
limit | number | No | Maximum number of folders to return |
page | number | No | Page number for pagination |
| Parameter | Type | Description |
|---|
folders | array | List of folders |
Create a new folder in Grafana
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Grafana Service Account Token |
baseUrl | string | Yes | Grafana instance URL (e.g., https://your-grafana.com\) |
organizationId | string | No | Organization ID for multi-org Grafana instances |
title | string | Yes | The title of the new folder |
uid | string | No | Optional UID for the folder (auto-generated if not provided) |
| Parameter | Type | Description |
|---|
id | number | The numeric ID of the created folder |
uid | string | The UID of the created folder |
title | string | The title of the created folder |
url | string | The URL path to the folder |
- Category:
tools
- Type:
grafana