Skip to main content

Grafana

@keeb/grafanav2026.04.22.3· MIT· 8d agoMODELS·SKILLS
01README

@keeb/grafana

Swamp extension for Grafana dashboard and alert management via the Grafana HTTP API.

Models

grafana/instance

Manage dashboards, alert rules, contact points, and notification policies on a Grafana instance.

Method Description
discover List all dashboards
pushDashboard Create or update a dashboard from a JSON file
exportDashboard Export a dashboard to JSON
configureContactPoint Configure a notification contact point (e.g. Discord webhook)
configureNotificationPolicy Set the notification routing policy
pushAlertRule Create or update an alert rule
createAnnotation Create a dashboard annotation (used to mark deploys, server events)

Workflows

None — dashboard and alert deployment workflows are defined in the consuming project.

Dependencies

Install

swamp extension pull @keeb/grafana

Example

Push a dashboard JSON file and create a deploy annotation:

models:
  - name: grafana
    type: "@keeb/grafana/instance"
    globalArguments:
      grafanaUrl: "http://grafana.local:3000"
      apiKey: "${vault.grafana.apiKey}"

jobs:
  - name: push-and-annotate
    steps:
      - model: grafana
        method: pushDashboard
        inputs:
          dashboardFile: "dashboards/hosts.json"
      - model: grafana
        method: createAnnotation
        inputs:
          text: "deploy ${env.GIT_SHA}"
          tags: '["deploy"]'

License

MIT

02Models1
@keeb/grafana/instancev2026.03.05.1grafana_instance.ts

Global Arguments

ArgumentTypeDescription
grafanaUrlstringGrafana URL (e.g., http://grafana.treehouse.local)
apiKey?stringGrafana API key for authentication (optional)
fn discover()
Validate Grafana is running, list dashboards and datasources
fn pushDashboard(dashboardFile: string)
Read dashboard JSON from repo and push to Grafana
ArgumentTypeDescription
dashboardFilestringPath to dashboard JSON relative to repo root
fn exportDashboard(dashboardUid: string, outputFile: string)
Export a dashboard from Grafana to a local JSON file
ArgumentTypeDescription
dashboardUidstringUID of the dashboard to export
outputFilestringOutput file path relative to repo root
fn getDashboard(dashboardUid: string)
Fetch a dashboard from Grafana and store its full content (panels, variables, etc.)
ArgumentTypeDescription
dashboardUidstringUID of the dashboard to fetch
fn configureContactPoint(webhookUrl: string, name?: string)
Create or update a Discord webhook contact point in Grafana
ArgumentTypeDescription
webhookUrlstringDiscord webhook URL
name?stringContact point name
fn configureNotificationPolicy(contactPointName?: string)
Set the default notification policy to route to a contact point
ArgumentTypeDescription
contactPointName?stringContact point receiver name
fn pushAlertRule(ruleFile: string)
Read alert rule JSON from repo and push to Grafana
ArgumentTypeDescription
ruleFilestringPath to alert rule JSON relative to repo root
fn createAnnotation(text: string, tags?: string, dashboardUid?: string)
Create a Grafana annotation (global or scoped to a dashboard)
ArgumentTypeDescription
textstringAnnotation text
tags?stringJSON array of annotation tags
dashboardUid?stringOptional dashboard UID to scope annotation
fn queryMetrics(query: string, start?: string, end?: string, step?: string)
Query Prometheus metrics via Grafana datasource proxy
ArgumentTypeDescription
querystringPromQL query string
start?stringRange start time (ISO8601 or relative like '24h')
end?stringRange end time (ISO8601, defaults to now)
step?stringQuery step interval
03Skills1
grafana3 files

Claude Code skill for managing Grafana dashboards, alerts, and annotations.

04Previous Versions4
2026.04.15.1Apr 15, 2026

Modified 1 models

2026.04.02.1Apr 2, 2026

Modified 1 models

2026.03.18.2Mar 18, 2026

Modified 1 models

2026.03.05.1Mar 5, 2026
05Stats
A
100 / 100
Downloads
30
Archive size
80.0 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Security Notice

This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.

07Platforms
08Labels