GRAFANA EXTENSIONS
Every Swamp extension that covers Grafana, as published in the registry. Install
any of them with swamp extension pull.
Extensions
| Extension | Version | License | Contents |
|---|---|---|---|
| @keeb/grafana | 2026.07.18.1 | - | 1 behavior types |
| @shrug/grafana-ext | 2026.07.11.1 | - | 1 behavior types |
@keeb/grafana
swamp extension pull @keeb/grafanaBehavior type @keeb/grafana/instance
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
grafanaUrl |
string | yes | Grafana URL (e.g., http://grafana.treehouse.local) |
apiKey |
string | no | Grafana API key for authentication (optional) |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
discover |
Validate Grafana is running, list dashboards and datasources | - |
pushDashboard |
Read dashboard JSON from repo and push to Grafana | dashboardFile (optional) |
exportDashboard |
Export a dashboard from Grafana to a local JSON file | dashboardUid (optional), outputFile (optional) |
getDashboard |
Fetch a dashboard from Grafana and store its full content (panels, variables, etc.) | dashboardUid (optional) |
configureContactPoint |
Create or update a Discord webhook contact point in Grafana | webhookUrl (optional), name (optional) |
configureNotificationPolicy |
Set the default notification policy to route to a contact point | contactPointName (optional) |
pushAlertRule |
Read alert rule JSON from repo and push to Grafana | ruleFile (optional) |
createAnnotation |
Create a Grafana annotation (global or scoped to a dashboard) | tags (optional), text (optional), dashboardUid (optional) |
queryMetrics |
Query Prometheus metrics via Grafana datasource proxy | query (optional), start (optional), end (optional), step (optional) |
queryLogs |
Query Loki logs via the Grafana Loki datasource proxy (LogQL query_range). The Loki sibling of queryMetrics. | query (optional), start (optional), end (optional), limit (optional), direction (optional), datasourceName (optional) |
Data written:
| Resource | Description |
|---|---|
instance |
Grafana instance discovery result |
dashboard |
Dashboard push/export result |
dashboardContent |
Full dashboard content from Grafana (panels, variables, etc.) |
alert |
Alert rule push result |
annotation |
Grafana annotation |
queryResult |
Prometheus query result |
logResult |
Loki LogQL query result (streams + lines) |
@shrug/grafana-ext
swamp extension pull @shrug/grafana-extBehavior type @shrug/grafana-admin/instance
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
grafanaUrl |
string | no | Grafana base URL (no trailing slash), e.g. https://grafana.example.com |
adminUser |
string | no | Grafana server-admin username for basic auth |
adminPassword |
string | yes | Grafana server-admin password — resolve from a vault via CEL, do not hard-code |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
ensureServiceAccount |
Idempotently ensure a service account with the given role exists in an org, optionally minting a token. Dry-run unless confirm:true; the minted secret is printed once and never persisted. | orgId, name, role (optional), mintToken (optional), tokenName (optional), force (optional), confirm (optional) |
Data written:
| Resource | Description |
|---|---|
serviceAccount |
State + plan for an ensured service account (never stores the token secret) |