grafana-skill_skill

This skill helps you automate Grafana resource management via HTTP API, including dashboards, data sources, alerting, folders, and users.
  • Python

16

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill julianobarbosa/claude-code-skills --skill grafana-skill

  • SKILL.md6.9 KB

Overview

This skill provides comprehensive programmatic control of Grafana via its HTTP API. It covers creating, reading, updating, and deleting dashboards, data sources, folders, alerts, annotations, and user/team/org management. It is intended for automation, provisioning, and operational workflows against Grafana instances.

How this skill works

The skill wraps Grafana API endpoints into reusable workflows and a client library so you can call search, get, save, delete, and provisioning endpoints programmatically. It authenticates using a service account token or API token and supports organization scoping via headers. Common operations include dashboard CRUD with versioning, data source management, alert rule provisioning, folder and permission management, and annotation or query execution.

When to use it

  • Automating dashboard lifecycle tasks: create, update, clone, export, restore versions, or delete dashboards.
  • Provisioning and managing data sources and verifying connection health programmatically.
  • Configuring alerting: rules, contact points, and notification policies as code.
  • Managing folders, access control, users, teams, and organization-scoped operations.
  • Generating, querying, or importing annotations and executing data source queries for reports.

Best practices

  • Prefer UIDs over numeric IDs to keep resources portable across Grafana instances.
  • Include dashboard version when updating to avoid accidental overwrites and use overwrite:true only when intentional.
  • Use service account tokens for automation; set X-Grafana-Org-Id header when operating across orgs.
  • Handle pagination and rate limits; check HTTP codes (401/403/404/409/412) for deterministic retries.
  • Back up exported dashboard JSON before bulk operations and test changes in a staging Grafana first.

Example use cases

  • List all dashboards tagged 'production', export each to JSON, and store backups in a repo.
  • Create a new dashboard from a JSON file or clone an existing dashboard into a different folder.
  • Bulk-update dashboard tags across an organization using the client library in a script.
  • Provision a new Prometheus data source and run a health check before enabling dashboards.
  • Restore a dashboard to a previous version after an unwanted change or regression.

FAQ

Use a Grafana service account token (preferred) or API token in the Authorization: Bearer header and set X-Grafana-Org-Id if targeting a specific organization.

Can I prevent overwriting concurrent edits?

Yes. Include the dashboard version when saving updates; Grafana returns 412 on version mismatches so you can reconcile changes before retrying.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational