100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

Grafana Cheat Sheet

Grafana Cheat Sheet

Reference for Grafana dashboard JSON, data source provisioning, panel queries, and alerting configuration for visualizing metrics.

2 PagesIntermediateFeb 15, 2026

Data Source Provisioning

YAML file provisioning a Prometheus data source on startup.

yaml
apiVersion: 1datasources:  - name: Prometheus    type: prometheus    access: proxy    url: http://prometheus:9090    isDefault: true    editable: false

Dashboard Provisioning

Auto-load dashboard JSON files from a directory.

yaml
apiVersion: 1providers:  - name: 'default'    orgId: 1    folder: ''    type: file    options:      path: /var/lib/grafana/dashboards

Key Concepts

Core Grafana building blocks.

  • data source- Connection to a backend (Prometheus, Loki, InfluxDB, MySQL) that panels query
  • panel- A single visualization (graph, table, gauge, stat) bound to a query
  • dashboard variable- Templated input (e.g. $instance) letting users filter panels dynamically
  • alert rule- Condition evaluated on a query result that triggers notifications
  • contact point- Destination (Slack, email, PagerDuty) that receives firing alerts
  • folder- Organizational grouping of dashboards with shared permissions

grafana-cli & HTTP API

Managing plugins and dashboards via CLI/API.

bash
grafana-cli plugins install grafana-piechart-panelgrafana-cli plugins ls# Create/update a dashboard via HTTP APIcurl -X POST http://admin:admin@localhost:3000/api/dashboards/db \  -H "Content-Type: application/json" \  -d @dashboard.json
Pro Tip

Store dashboards as JSON in version control and load them via the file provisioner rather than editing in the UI — this makes dashboard changes reviewable and reproducible across environments.

Was this cheat sheet helpful?

Explore Topics

#Grafana#GrafanaCheatSheet#DevOps#Intermediate#DataSourceProvisioning#DashboardProvisioning#KeyConcepts#Cli#Databases#InfrastructureAsCode#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech

Professional Web Designing Services

  • Responsive Websites
  • E-commerce Solutions
  • SEO Friendly Design
  • Fast & Secure
  • Support & Maintenance
Get a Free Quote

Share this Cheat Sheet