跳至主要内容
小龙虾小龙虾AI
🤖

Grafana

Grafana HTTP API integration. Inspect dashboards, folders, data sources, alert rules, and teams. Use this skill when users want to query observability data,...

下载2.3k
星标32
版本1.0.6
数据分析
安全通过

技能说明


name: grafana-monitoring description: Grafana HTTP API integration. Inspect dashboards, folders, data sources, alert rules, and teams. Use this skill when users want to query observability data, inspect monitoring resources, or manage Grafana dashboards.

Grafana

Grafana

Access Grafana via the Grafana HTTP API with managed credentials. Inspect dashboards, folders, data sources, alert rules, teams, and observability resources.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Grafana API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Grafana
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Grafana

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│     Grafana      │
│   (User Chat)   │     │   (OAuth)    │     │   (HTTP API)     │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Grafana   │                       │
         │                       │  4. Secure Token       │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │  Grafana │
   │  File    │           │ Auth     │           │  Cloud   │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Grafana again."

Quick Start

# List dashboards
clawlink_call_tool --tool "grafana_list_dashboards" --params '{}'

# Get a dashboard
clawlink_call_tool --tool "grafana_get_dashboard" --params '{"uid": "YOUR_DASHBOARD_UID"}'

# List folders
clawlink_call_tool --tool "grafana_list_folders" --params '{}'

Authentication

All Grafana tool calls are authenticated automatically by ClawLink using the configured Grafana credentials (API key or service account token).

No API key is required in chat. ClawLink stores the credentials securely and injects them into every Grafana API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=grafana and connect Grafana.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for grafana in the list.

Verify Connection

clawlink_list_tools --integration grafana

Response: Returns the live tool catalog for Grafana.

Reconnect

If Grafana tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=grafana
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration grafana

Security & Permissions

  • Access is scoped to resources the configured Grafana API key or service account can access.
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete dashboard, delete folder, delete alert rule) are marked as high-impact and must be confirmed.

Tool Reference

Dashboard Operations

ToolDescriptionMode
grafana_list_dashboardsList all dashboards the user can accessRead
grafana_get_dashboardGet a dashboard by UIDRead
grafana_create_dashboardCreate a new dashboardWrite
grafana_update_dashboardUpdate an existing dashboardWrite
grafana_delete_dashboardDelete a dashboardWrite
grafana_get_dashboard_permissionsGet permissions for a dashboardRead
grafana_update_dashboard_permissionsUpdate dashboard permissionsWrite

Folder Management

ToolDescriptionMode
grafana_list_foldersList all foldersRead
grafana_get_folderGet a folder by UIDRead
grafana_create_folderCreate a new folderWrite
grafana_update_folderUpdate a folder's title or UIDWrite
grafana_delete_folderDelete a folderWrite

Data Sources

ToolDescriptionMode
grafana_list_datasourcesList all configured data sourcesRead
grafana_get_datasourceGet a data source by IDRead
grafana_create_datasourceCreate a new data sourceWrite
grafana_update_datasourceUpdate a data sourceWrite
grafana_delete_datasourceDelete a data sourceWrite

Alert Rules

ToolDescriptionMode
grafana_list_alert_rulesList all alert rulesRead
grafana_get_alert_ruleGet a specific alert rule by UIDRead
grafana_create_alert_ruleCreate a new alert ruleWrite
grafana_update_alert_ruleUpdate an existing alert ruleWrite
grafana_delete_alert_ruleDelete an alert ruleWrite

Alert Instances

ToolDescriptionMode
grafana_list_alert_instancesList active alert instancesRead

Teams

ToolDescriptionMode
grafana_list_teamsList all teamsRead
grafana_get_teamGet a team by IDRead
grafana_create_teamCreate a new teamWrite
grafana_update_teamUpdate a teamWrite
grafana_delete_teamDelete a teamWrite
grafana_list_team_membersList members of a teamRead
grafana_add_team_memberAdd a member to a teamWrite
grafana_remove_team_memberRemove a member from a teamWrite

Admin & Organization

ToolDescriptionMode
grafana_get_organizationGet current organization infoRead
grafana_list_organization_usersList users in the current organizationRead
grafana_list_usersList all users in GrafanaRead
grafana_get_userGet a user by IDRead

Code Examples

List dashboards

clawlink_call_tool --tool "grafana_list_dashboards" \
  --params '{
    "limit": 50
  }'

Get a dashboard

clawlink_call_tool --tool "grafana_get_dashboard" \
  --params '{
    "uid": "YOUR_DASHBOARD_UID"
  }'

Create a new dashboard

clawlink_call_tool --tool "grafana_create_dashboard" \
  --params '{
    "dashboard": {
      "title": "Service Health Overview",
      "tags": ["health", "overview"],
      "timezone": "browser",
      "panels": []
    },
    "folderUid": "YOUR_FOLDER_UID"
  }'

List folders

clawlink_call_tool --tool "grafana_list_folders" \
  --params '{}'

List data sources

clawlink_call_tool --tool "grafana_list_datasources" \
  --params '{}'

Create an alert rule

clawlink_call_tool --tool "grafana_create_alert_rule" \
  --params '{
    "title": "High Error Rate",
    "condition": "C",
    "data": [
      {"refId": "A", "queryType": "prometheus"},
      {"refId": "B", "queryType": "reduce"},
      {"refId": "C", "queryType": "threshold"}
    ],
    "folderUID": "YOUR_FOLDER_UID"
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Grafana is connected.
  2. Call clawlink_list_tools --integration grafana to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration grafana.
  5. If no Grafana tools appear, direct the user to https://claw-link.dev/dashboard?add=grafana.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → call                                          │
│                                                             │
│  Example: List dashboards → Get details → Show results     │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Describe tool → Preview → User approves            │
│           → Execute update                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, list, and get operations before writes.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Grafana supports both Grafana Cloud and self-hosted (OSS/Enterprise) instances.
  • API access requires an API key or service account token with appropriate roles.
  • Dashboard UIDs are the stable identifier for sharing and API calls.
  • Folder UIDs are used to organize dashboards and alert rules.
  • Alert rules must be placed in a folder and reference a data source.
  • Permissions for dashboards and folders can be configured to control access.

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration grafana.
Missing connectionGrafana is not connected. Direct the user to https://claw-link.dev/dashboard?add=grafana.
DASHBOARD_NOT_FOUNDDashboard does not exist. Check the UID.
INVALID_ARGUMENTInvalid parameter or missing required field. Review the tool schema with clawlink_describe_tool.
UNAUTHORIZEDGrafana credentials are invalid or lack permissions. Check API key access.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly grafana.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.

Resources


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo

如何使用「Grafana」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Grafana技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能