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/panels.md
Grafana Panels and Visualizations - Detailed Reference
What is a Panel?
A panel is the basic building block of a Grafana dashboard. Each panel combines:
A query (or multiple queries) to a data source
A visualization type to display the data
Field configuration (units, thresholds, color mappings)
Optional transformations to reshape the data before display
Panel Editor
Open the panel editor by clicking a panel's title > Edit, or clicking Add visualization for a new panel.
Panel Editor Layout
Top bar: Back to dashboard, Discard changes, Save dashboard
Center: Visualization preview (live update as you configure)
Toggle: "Table view" - shows raw query results as a table for debugging
Right sidebar tabs:
Query - configure data sources and write queries
Transform - apply data transformations
Alert - create alert rules from this panel
Below tabs: visualization-specific options and field config
Query Tab
Data source selector: Choose which data source to query
Query editor: Data-source-specific interface (PromQL for Prometheus, LogQL for Loki, SQL for databases)
Query options:
Max data points: Limit data points fetched
Min interval: Minimum auto-calculated interval
Interval: Override the auto-calculated interval
Relative time: Override dashboard time range for this panel only
Time shift: Shift the time range (e.g., to compare to last week)
+ Query: Add multiple queries (labeled A, B, C...)
Expression: Add server-side math expressions combining query results
Visualization Types
Time Series (default)
Best for: Metrics over time, continuous data
Renders as lines, points, or bars
Supports multiple series
Configurable line width, fill, point size
Supports thresholds as colored background regions
Supports annotations overlay
Graph styles: Lines, Bars, Points; can mix per series
Stacking: None, Normal, 100%
Axis: Left Y, Right Y, hidden
Default visualization - supports alerting
Stat
Best for: Single important metric (KPI display)
Shows one or more values as large text
Supports sparkline background
Color modes: value, background, none
Can show last value, mean, sum, etc.
Great for dashboards that need quick status overviews
Bar Chart
Best for: Comparing categorical data
Horizontal or vertical orientation
Grouped or stacked
Supports labels on bars
Gauge
Best for: Showing a value relative to min/max range
Circular gauge with arc
Configurable thresholds set colors
Shows current value prominently
Bar Gauge
Best for: Multiple metrics as horizontal/vertical bars
Useful for comparing many items
Supports thresholds for color coding
Modes: gradient, retro LCD, basic
Table
Best for: Tabular data, multi-column metrics
Supports sorting by column
Column width customization
Cell display modes: color text, color background, gradient gauge
Pagination for large datasets
Can embed sparklines in cells
Heatmap
Best for: Distribution over time, histogram-over-time
X axis: time; Y axis: buckets; Color: density/value
Supports pre-bucketed data (Prometheus histogram) and raw values
Tooltip shows exact bucket counts
Histogram
Best for: Value distribution analysis
Groups values into buckets
Can combine multiple series
Configurable bucket size
Pie Chart
Best for: Proportional data, parts-of-whole
Pie or donut style
Labels: name, value, percentage
Logs
Best for: Log data from Loki, Elasticsearch, etc.
Displays raw log lines with timestamp
Log level coloring (info/warn/error)
Search/filter within results
Deduplication and time wrapping
Prettify JSON option
Traces
Best for: Distributed tracing visualization (Tempo)
Renders trace spans as a waterfall/Gantt chart
Shows service name, operation, duration
Click to drill into trace details
Flame Graph
Best for: CPU profiling data (Pyroscope)
Visualizes call stacks by CPU time
Click to zoom into subtrees
Node Graph
Best for: Service dependency maps, network topology
Renders nodes and edges
Node color/size configurable by metric
Geomap
Best for: Geographic data visualization
Layers: markers, heatmap, route
Multiple base map options (OpenStreetMap, CARTO, etc.)
Supports GeoJSON data
Canvas
Best for: Custom layouts, process diagrams, status boards
Drag-and-drop element placement
Elements: text, metric value, rectangle, ellipse, icon, image, connections
Dynamic data binding per element
State Timeline
Best for: State changes over time (on/off, OK/warn/crit)
Horizontal bands showing state duration
Each series = one row
Color per state value
Status History
Best for: Periodic state checks over time
Grid: Y=services, X=time buckets
Color per state
XY Chart
Best for: Correlation between two metrics
Scatter plot
X and Y axis from different fields
Bubble size from a third field
Candlestick
Best for: Financial OHLC data
Open/High/Low/Close representation
Volume bars
Text
Best for: Documentation panels, headers
Renders Markdown or HTML
Alert List
Best for: Dashboard overview of current alert states
Dashboard List
Best for: Navigation panels linking to other dashboards
Field Configuration (Standard Options)
Available for most visualizations under the visualization options panel.
| Option | Description |
|---|---|
| Unit | Display unit (bytes, seconds, %, requests/sec, etc.) |
| Min / Max | Override auto-detected min/max for scales |
| Decimals | Number of decimal places |
| Display name | Override the series/field name |
| Color scheme | Fixed, thresholds-based, palette, etc. |
| No value | Text to display when value is null |
Thresholds
Define color-coded boundaries:
Absolute: Fixed numeric values (e.g., >90 = red, >70 = yellow, else green)
Percentage: Relative to min/max
Example threshold config:
Base (default): Green
70: Yellow (warn)
90: Red (crit)Value Mappings
Transform raw values into human-readable labels or colors:
Value to text: e.g.,
1-> "OK",0-> "Down"Range to text: e.g.,
0-50-> "Low"Regex to text: Match patterns
Data Links
Create clickable links from panel values:
Link to other dashboards with variable values interpolated
Link to external systems (e.g., Kibana, PagerDuty)
Use
${__value.raw}and${__field.name}in URLs
Field Overrides
Apply specific field options to individual series/columns rather than all data:
Click + Add field override in the Overrides section
Choose override target:
Fields with name (exact match)
Fields with name matching regex
Fields with type (number, string, time)
Fields returned by query (A, B, C...)
Add properties to override (unit, color, alias, thresholds, etc.)
Example: In a table with columns cpu_idle and cpu_used, set cpu_used to show as percentage and color by threshold while leaving cpu_idle with default styling.
Transformations
Transformations reshape query data before rendering. Apply multiple in sequence.
Access: Panel editor > Transform tab > Add transformation
Most-Used Transformations
| Transformation | Description |
|---|---|
| Reduce | Collapse a time series to a single value (last, mean, sum, max, min) |
| Filter by name | Keep only specific fields/columns |
| Filter by value | Filter rows where a field matches a condition |
| Organize fields | Rename, reorder, or hide fields |
| Merge | Combine multiple query results into one table |
| Join by field | SQL-style join on a common field (e.g., time) |
| Group by | Group rows and aggregate (count, sum, mean, etc.) |
| Sort by | Sort rows by a field |
| Limit | Keep only first N rows |
| Add field from calculation | Add a new column computed from existing columns |
| Convert field type | Change a field's data type |
| Rename by regex | Batch rename fields using regex |
| Extract fields | Parse JSON or regex from a string field |
| Labels to fields | Convert label key/values into separate columns |
| Rows to fields | Pivot: turn row values into column headers |
| Prepare time series | Normalize time series format |
| Time series to table | Convert time series format to table format |
Enable "Debug" toggle on any transformation to see input/output for troubleshooting.
Query Options
Multiple queries
Add multiple queries (A, B, C...) to one panel. They are overlaid in the visualization. Use this to compare metrics or show multiple services on one graph.
Expressions (server-side)
Server-side expressions allow math across query results:
Math:
$A + $B,$A / $B * 100Reduce: Collapse a series to scalar
Resample: Change time resolution of a series
Classic conditions: Threshold logic (used in alerting)
Example - calculate error rate as percentage:
Query A: total_requests{job="api"}
Query B: error_requests{job="api"}
Expression C (Math): $B / $A * 100
Display C as percentageImportant query variables
These variables are available in queries:
| Variable | Description |
|---|---|
$__interval | Auto-calculated interval based on time range and resolution |
$__rate_interval | Interval suitable for rate() functions (at least 4x scrape interval) |
$__from | Start of the current time range (ms epoch) |
$__to | End of the current time range (ms epoch) |
$__range | Duration of current time range (e.g., "6h") |
$__range_s | Duration in seconds |
$__range_ms | Duration in milliseconds |
Example PromQL using interval variable:
rate(http_requests_total[${__rate_interval}])Panel Inspect
Click panel menu (3-dot) > Inspect to access:
Data: Raw table view of the data powering the panel
Stats: Query performance (time, row count)
JSON: Panel JSON model
Query: Equivalent of query inspector showing raw query and response
Performance Tips
Limit max data points to avoid over-fetching
Use recording rules in Prometheus for expensive queries
Set longer min intervals for historical dashboards
Use
$__intervalvariable in queries to align with time resolutionUse
$__rate_intervalinstead of hardcoded intervals for rate() queriesAvoid too many panels on one dashboard (aim for <20)
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