Generated banner for Grafana Oss
Generated logo for Grafana Oss

Grafana Oss

Grafana LabsOfficialPublished by Grafana Labs

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • Medium risk

From the author

Configure Grafana OSS — provisions dashboards from YAML, sets up data sources (Prometheus / Loki / Tempo / Pyroscope), writes dashboard JSON with template variables, builds panel queries, assigns built-in roles (Viewer / Editor / Admin / GrafanaAdmin), mints service-account tokens, edits grafana.ini server config, creates annotations, installs plugins via provisioning, and validates each step with a health-check curl. Use when building dashboards, configuring data sources, setting up provisioning YAML, picking a panel type, writing template variables, managing users and roles, configuring SMTP/OAuth in grafana.ini, creating annotations via API, troubleshooting why a provisioned dashboard isn't showing up, or running Grafana OSS locally — even when the user says "set up a Prometheus data source", "provision dashboards from git", "make a service account", or "configure SSO in OSS" without saying "Grafana OSS".
— the description by Grafana Labs

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/grafana/grafana-oss/download
  2. Unzip 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

Docs: https://grafana.com/docs/grafana/latest.md

Common Workflows

Provisioning dashboards from disk
  1. Drop dashboard JSON file(s) under /var/lib/grafana/dashboards/

  2. Add a provider in provisioning/dashboards/default.yaml (see § Dashboard provisioning below)

  3. Restart Grafana so the provider config is loaded

  4. 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
  1. Write provisioning/datasources/datasources.yaml (see § Data source provisioning below)

  2. Restart Grafana

  3. 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
  1. Provision via YAML or POST /api/serviceaccounts (full API in references/api.md § Users + service accounts)

  2. Mint a token via POST /api/serviceaccounts/{id}/tokens

  3. Verify 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: true

For 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:4040

RBAC (built-in roles)

RolePermissions
ViewerRead dashboards, alerts
EditorCreate/edit dashboards, alerts
AdminManage data sources, users, plugins
GrafanaAdminServer-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:4040

After 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-code

  • references/datasources.md — data source setup and query examples for Prometheus, Loki, Tempo, SQL, CloudWatch, and plugins

  • references/panel-types.md — panel-type table + decision guide for picking the right one

  • references/panels.md — panel editor, visualization options, field config, transformations, query options, inspection, and performance tips

  • references/alerting.md — alerting concepts, contact points, notification policies, templates, silences, and common rule examples

  • references/api.md — full Grafana OSS API reference (dashboards, data sources, users, service accounts, annotations) with verification curls and common failure modes

  • references/config.md — grafana.ini server / database / SMTP / auth / security / feature-toggle config + restart-required issues

Files

references/dashboards.md

Grafana Dashboards - Detailed Reference

What is a Dashboard?

A Grafana dashboard is a set of one or more panels organized into rows, providing an at-a-glance view of related information. Dashboards connect to data sources, display data through panels, and support interactive filtering via variables.

Core Components

  • Panels: Containers that display visualizations; each combines a query + a visualization type

  • Rows: Horizontal groupings of panels; can be collapsed for organization

  • Data Sources: Connections to databases, APIs, or services that panels query

  • Variables: Dropdown selectors at the top of a dashboard for dynamic filtering

  • Annotations: Markers overlaid on graphs to indicate events


Creating Dashboards

From scratch
  1. Click Dashboards in the left sidebar

  2. Click New > New dashboard

  3. Click Add visualization to add your first panel

  4. Select a data source, write a query, choose visualization type

  5. Click Apply to save the panel to the dashboard

  6. Click the save icon (or Ctrl+S) to save the dashboard

From a template / Import
  • Click Dashboards > New > Import

  • Paste a dashboard JSON, enter a Grafana.com dashboard ID, or upload a JSON file

  • Grafana.com hosts thousands of community dashboards (grafana.com/grafana/dashboards)


Dashboard Settings

Access via the gear icon at the top-right of any dashboard.

SettingDescription
GeneralName, description, tags, folder, editable flag
AnnotationsConfigure annotation queries that overlay events on panels
VariablesAdd/edit template variables (dropdowns at top)
LinksAdd links to other dashboards or external URLs
JSON ModelView/edit raw JSON for the entire dashboard
VersionsBrowse and restore prior versions
Time optionsDefault time range, auto-refresh intervals, timezone

Time Range Controls

  • Time picker (top-right): Select absolute or relative ranges (Last 6 hours, Last 7 days, etc.)

  • Auto-refresh: Set to Off, 5s, 10s, 30s, 1m, 5m, etc.

  • Zoom: Click-drag on any time series to zoom in

Common relative time shortcuts
now-5m    last 5 minutes
now-1h    last 1 hour
now-24h   last 24 hours
now-7d    last 7 days
now/d     today so far
now-1d/d  yesterday

Annotations

Annotations are event markers overlaid on time series panels.

Types
  • Native annotations: Manually add a note to a specific time directly in the dashboard

  • Query annotations: Pull events from a data source and display as markers

Adding a manual annotation
  • Hold Ctrl (or Cmd on Mac) and click a time series panel

  • Type a description; optionally set a time range


Library Panels

Library panels are reusable panel definitions shared across multiple dashboards.

  • Create: Panel menu (3-dot) > "Create library panel"

  • Use: Add a panel > "Add from panel library"

  • Update: Edit the source panel; all dashboards using it reflect the change

  • Unlink: Detach to make it independent in a specific dashboard


Panel Layout

  • Drag panel corners to resize

  • Drag panel header to move

  • Add > Row to insert collapsible rows

  • Panel menu > Duplicate to clone within the same dashboard


Dashboard Versions

  • Access via Dashboard Settings > Versions

  • See who saved what and when

  • Compare two versions (diff view)

  • Restore any previous version


JSON Model

Every dashboard is stored as a JSON document.

Key top-level JSON fields:

{
  "title": "My Dashboard",
  "uid": "abc123",
  "tags": ["production", "infrastructure"],
  "time": { "from": "now-6h", "to": "now" },
  "refresh": "30s",
  "panels": [],
  "templating": { "list": [] },
  "annotations": { "list": [] }
}

Sharing Dashboards

  • Click Share icon > Link tab

  • Toggle "Lock time range" to embed the current time window

  • Toggle "Include template variable values"

Snapshot
  • Share > Snapshot: Creates a read-only, public snapshot

  • Contains rendered data at share time - no live data source access needed

  • Can expire (1 hour, 1 day, 7 days, or never)

Export / Import JSON
  • Share > Export: Download the dashboard JSON

  • Import at Dashboards > New > Import

  • Useful for version control, migration, sharing with the community

Embed
  • Share > Embed: Generates an iframe HTML snippet

  • Requires anonymous access in Grafana config (OSS/Enterprise only)

Public dashboards (Grafana 10+)
  • Make a dashboard publicly accessible with no login

  • Enable per-dashboard in Share > Public dashboard


Playlists

Playlists cycle through dashboards automatically at a configurable interval.

  • Create at Dashboards > Playlists > New playlist

  • Add dashboards by name or tag

  • Set interval (e.g., 5 minutes)

  • Append ?kiosk=1 to URL for kiosk/TV mode


Best Practices

  1. Organize with folders: Use folders as RBAC permission boundaries

  2. Use variables: Make dashboards reusable across environments/services

  3. Limit panels per dashboard: Aim for <20 panels for performance

  4. Use library panels: Standardize common panels across teams

  5. Tag dashboards: Consistent tags for searchability

  6. Version control: Export JSON and store in Git

  7. Use rows: Collapse related panels to organize complex dashboards

  8. Template your queries: Use variables so one dashboard covers many targets


Keyboard Shortcuts

KeyAction
Ctrl+SSave dashboard
eOpen panel editor (when panel focused)
vToggle panel fullscreen
d rRefresh all panels
d sDashboard settings
d kToggle kiosk mode
?Show all shortcuts

Provisioning Dashboards (as Code)

# /etc/grafana/provisioning/dashboards/default.yaml
apiVersion: 1

providers:
  - name: default
    orgId: 1
    folder: Infrastructure
    type: file
    disableDeletion: false
    updateIntervalSeconds: 10
    allowUiUpdates: false
    options:
      path: /var/lib/grafana/dashboards
      foldersFromFilesStructure: true

Place dashboard JSON files in /var/lib/grafana/dashboards/. Subdirectories become folders when foldersFromFilesStructure: true.

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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download grafana-oss.zip