Grafana Oss
Grafana LabsOfficialPublished by Grafana Labs
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides comprehensive guidance for managing Grafana OSS instances. It covers the full lifecycle of configuration, from setting up data sources like Prometheus, Loki, and Tempo to automating dashboard provisioning via YAML files. It also details user and service account management, RBAC role assignments, plugin installation, and server-level configuration via grafana.ini. The skill emphasizes validation through health-check API calls to ensure that provisioned resources are correctly integrated and operational.
What it does
- Provisions dashboards and data sources using YAML configuration files.
- Manages service accounts and mints authentication tokens for API access.
- Configures server settings, including SMTP and OAuth, via grafana.ini.
- Assigns built-in roles such as Viewer, Editor, Admin, and GrafanaAdmin.
- Installs and configures plugins through provisioning workflows.
- Validates configuration success using API-based health checks.
When to use it
- When setting up a new Grafana OSS instance or automating environment configuration.
- When you need to provision dashboards or data sources as code.
- When managing user access, roles, or service account tokens.
- When troubleshooting why a provisioned dashboard or data source is not appearing.
- When configuring server-level settings like authentication or SMTP.
Advantages
- Enables infrastructure-as-code practices for Grafana configuration.
- Provides clear, repeatable steps for common administrative tasks.
- Includes built-in verification steps to confirm configuration success.
- Centralizes documentation for API interactions and YAML schemas.
Usage examples
- “How do I set up a Prometheus data source using a YAML file?”
- The agent provides the specific YAML structure for a Prometheus data source, including the required fields like name, type, and URL, and explains how to verify it via the health-check API.
- “Create a service account for CI/CD with read-only access.”
- The agent provides the YAML configuration for the service account with the 'Viewer' role and the subsequent API commands to mint a token for that account.
- “My provisioned dashboard isn't showing up in Grafana. How do I debug it?”
- The agent guides you through checking the provisioning logs, verifying the file path, and using the API to confirm if the dashboard UID exists in the system.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/grafana/grafana-oss/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip grafana-oss.zip -d .agents/skills
Documentation by Grafana Labs
Grafana OSS
Common Workflows
Provisioning dashboards from disk
Drop dashboard JSON file(s) under
/var/lib/grafana/dashboards/Add a provider in
provisioning/dashboards/default.yaml(see § Dashboard provisioning below)Restart Grafana so the provider config is loaded
Verify the dashboard landed:
curl https://grafana.example.com/api/dashboards/uid/<uid> \ -H "Authorization: Bearer <token>" | jq '.dashboard.title'Returns the title → success. 404 → provisioning didn't pick it up; check Grafana server logs (
journalctl -u grafana-server | grep -i provisioning) for parse errors.
Provisioning data sources
Write
provisioning/datasources/datasources.yaml(see § Data source provisioning below)Restart Grafana
Health-check the data source via API:
curl https://grafana.example.com/api/datasources/uid/<uid>/health \ -H "Authorization: Bearer <token>" # { "status": "OK", "message": "..." } → working # { "status": "ERROR", ... } → URL unreachable or auth misconfigured
Creating a service account + token
Provision via YAML or
POST /api/serviceaccounts(full API in references/api.md § Users + service accounts)Mint a token via
POST /api/serviceaccounts/{id}/tokensVerify the token works:
curl https://grafana.example.com/api/org \ -H "Authorization: Bearer <new-token>" # 200 + org JSON → token + role assignment work # 401 → token wrong; 403 → role wrong
Dashboard provisioning
# provisioning/dashboards/default.yaml
apiVersion: 1
providers:
- name: default
folder: MyFolder
type: file
disableDeletion: false
updateIntervalSeconds: 30
options:
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: trueFor the dashboard JSON shape itself (panels, queries, template variables), see references/dashboard-json.md.
Data source provisioning
# provisioning/datasources/datasources.yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
jsonData:
timeInterval: 15s
httpMethod: POST
- name: Loki
type: loki
access: proxy
url: http://loki:3100
- name: Tempo
type: tempo
access: proxy
url: http://tempo:3200
jsonData:
tracesToLogsV2:
datasourceUid: loki_uid
tags: [{ key: "service.name", value: "app" }]
serviceMap:
datasourceUid: prometheus_uid
nodeGraph:
enabled: true
- name: Pyroscope
type: grafana-pyroscope-datasource
url: http://pyroscope:4040RBAC (built-in roles)
| Role | Permissions |
|---|---|
| Viewer | Read dashboards, alerts |
| Editor | Create/edit dashboards, alerts |
| Admin | Manage data sources, users, plugins |
| GrafanaAdmin | Server-wide admin (superuser) |
Service-account provisioning:
# provisioning/access-control/service_accounts.yaml
apiVersion: 1
serviceAccounts:
- name: ci-reader
orgId: 1
role: Viewer
tokens:
- name: ci-token
# expires: optional ISO 8601 timestamp; omit for no-expiry tokens(Custom RBAC roles with fine-grained permissions are Enterprise / Cloud only — see the grafana-cloud/admin skill if you need those.)
Plugin provisioning
# provisioning/plugins/plugins.yaml
apiVersion: 1
apps:
- type: grafana-pyroscope-app
disabled: false
jsonData:
backendUrl: http://pyroscope:4040After restart, verify via GET /api/plugins/<plugin-id>/health.
References
references/dashboard-json.md— full dashboard JSON model + template variables + common problems (uid uniqueness, gridPos arithmetic, datasource uid matching)references/dashboards.md— dashboard workflows, settings, variables, annotations, sharing, versions, playlists, and provisioning-as-codereferences/datasources.md— data source setup and query examples for Prometheus, Loki, Tempo, SQL, CloudWatch, and pluginsreferences/panel-types.md— panel-type table + decision guide for picking the right onereferences/panels.md— panel editor, visualization options, field config, transformations, query options, inspection, and performance tipsreferences/alerting.md— alerting concepts, contact points, notification policies, templates, silences, and common rule examplesreferences/api.md— full Grafana OSS API reference (dashboards, data sources, users, service accounts, annotations) with verification curls and common failure modesreferences/config.md—grafana.iniserver / database / SMTP / auth / security / feature-toggle config + restart-required issues
Files
- ATTRIBUTION.mdAdded by AutoGineer842 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md6.0 KiB
- references/alerting.md11.2 KiB
- references/api.md2.7 KiB
- references/config.md2.3 KiB
- references/dashboard-json.md2.1 KiB
- references/dashboards.md6.1 KiB
- references/datasources.md9.8 KiB
- references/panel-types.md1.2 KiB
- references/panels.md10.3 KiB
references/config.md
grafana.ini configuration
Reference for grafana.ini server-side settings.
Contents
Server + database
Alerting
SMTP
Auth (OAuth example)
Security
Feature toggles
Server + database
[server]
http_port = 3000
domain = grafana.example.com
root_url = https://grafana.example.com/
[database]
type = postgres
host = postgres:5432
name = grafana
user = grafana
password = secretAfter changing these, restart Grafana and verify:
curl http://localhost:3000/api/healthreturns{"database": "ok", ...}curl http://localhost:3000/api/admin/settings | jq '.database'shows the new config
Alerting
[alerting]
enabled = true
[unified_alerting]
enabled = trueSMTP
[smtp]
enabled = true
host = smtp.gmail.com:587
user = [email protected]
password = yourpassword
from_address = [email protected]Verify by sending a test email via the Alerting → Contact points UI.
Auth (OAuth example)
[auth.generic_oauth]
enabled = true
name = Okta
client_id = your_client_id
client_secret = your_secret
auth_url = https://your-org.okta.com/oauth2/v1/authorize
token_url = https://your-org.okta.com/oauth2/v1/token
api_url = https://your-org.okta.com/oauth2/v1/userinfo
scopes = openid profile email groupsFor SAML and GitHub OAuth, see the grafana-cloud/admin skill. The configs are the same in OSS.
Security
[security]
admin_user = admin
admin_password = secret
allow_embedding = true # required for embedding dashboards in iframesadmin_password is only consulted on first startup. To change later, use grafana-cli admin reset-admin-password <new-password>.
Feature toggles
[feature_toggles]
enable = publicDashboardsMultiple toggles are space-separated:
enable = publicDashboards correlations grafanaApiServerCommon problems
grafana.inichanges need a restart — config is read at startup, not live-reloadedroot_urlmatters for OAuth callbacks — if you setdomainbut notroot_url, OAuth redirect URIs may not matchSections are global —
[server],[database], etc. apply at the process level, not per-org
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs network access
Security
What our scanner noticed· Medium risk
- References to credential files
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Grafana Labs
- Publisher
- Grafana Labs (Official)
- Source
- grafana/skills · skills/grafana-core/grafana-oss · commit 8fb72a5
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Grafana Labs or Grafana Labs.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download grafana-oss.zip