Skip to main content
AIDevOps
  • Learn
  • Learning Paths
  • Practice
  • Open Source
  • Books
  • Engineering

    AI DevOpsThe full map of building and operating AI servicesLLMOpsLLM deployment Β· evaluation Β· observabilityHands-on ProjectsBuild AI Agent projects

    Knowledge

    DocsTechnical documentationBlogEngineering articlesPloggerDevelopment log feed

    Validate

    Certification3-level skills certification Β· coming soon
AI Models
LlamaTutorial|MistralTutorial|GemmaTutorial|DeepSeekTutorial|QwenTutorial
🐳 DevOps
DevOps Intro & RoadmapLinuxDockerCI/CD|Kubernetes BasicsK8s AdvancedPrometheusGrafana
πŸ€– AI Applied Development
Applied AI Intro & RoadmapHugging FaceLangChainLlamaIndexLLMOps|LangGraphMCPMulti-AgentAgent Evaluation
🧠 AI Core
AI Intro & RoadmapML FundamentalsLLM Fundamentals|Python AIC++|PyTorchTensorFlowJAX
🧠 AI Agent Development
Finance AI AgentLLM API ServerStock Investing AgentAIOps AI AgentEducation AI AgentCoding AI Agent
🌱 Spring Cloud
Spring Intro & RoadmapSpring Cloud GatewaySpring BootJava|Spring AISpring SecuritySpring BatchSpring JPA
🧱 Infrastructure
Infrastructure Intro & RoadmapNginxRedis
☁️ Cloud
Cloud Intro & RoadmapAWSGCPAzureNCPCloudflare
🎨 Frontend
Frontend Intro & RoadmapJavaScriptTypeScript|ReactNext.js|VueNuxt|Electron
πŸ“± Mobile
Mobile Intro & RoadmapKotlinAndroidFlutter
βš™οΈ Backend
Backend Intro & RoadmapPython BasicsFastAPIDjangoFlask|CGoGinNode.js
πŸ’Ύ Database
DB Intro & RoadmapCore SQLOracleMySQLPostgreSQL|MongoDBVector DB
πŸ§ͺ Testing
k6JMeternGrinder
AIDevOps

Engineering AI. From Code to Production.
An engineering learning platform for building and operating AI and AI Agents

Learn

  • All Guides
  • Learning Paths
  • AI Tutorial
  • Practice
  • Books

Resources

  • AI DevOps
  • LLMOps
  • Hands-on Projects
  • Docs
  • Blog
  • Plogger
  • Open Source
  • Certification (coming soon)

Start Here

  • AI Core Roadmap
  • AI Applied Development Roadmap
  • Spring Cloud Roadmap
  • DevOps Roadmap
  • Infrastructure Roadmap

Β 

  • Cloud Roadmap
  • Frontend Roadmap
  • Mobile Roadmap
  • Backend Roadmap
  • Database Roadmap
Β© 2026 AIDevOps. All rights reserved.
Terms of ServicePrivacy PolicySitemaptestforge.kr
  1. Home
  2. Learn
  3. DevOps
  4. Grafana
Guide to data visualization & dashboards

πŸ“ˆ Grafana Complete Guide

Visitors

Visualize metrics, logs, and traces in a single dashboard with Grafana. Learn through practical examples: connecting data sources, building panels, variables, Unified Alerting, and provisioning (dashboards as code).

  • Advanced
  • Updated Oct 1, 2026
  • ~4 min read
  • 8 sections
  • 7 code examples

Learning Paths that include this guide

This guide is one step in the paths below. Study it together with the steps before and after.

  • DevOps / SRE Engineer β†’
  • AI Platform Engineer β†’
  • Production AI Engineer β†’
Building dashboards & panelsData source provisioningVariable-driven dashboard templatesUnified AlertingUser/organization permission management

Related frameworks & environments

πŸ“ŠPrometheusβ†’β˜ΈοΈKubernetes Basicsβ†’β˜ΈοΈK8s Advancedβ†’πŸ³Dockerβ†’

Contents

0 / 11
  1. How to use this guide
  2. Architecture diagrams
  3. What is Grafana?
  4. Installation (Docker Compose)
  5. Connecting data sources
  6. Dashboards & panels
  7. Variables & templates
  8. Unified Alerting
  9. Plugins & user/organization management
  10. Frequently asked questions
  11. Next steps
Contents 11 sections
  1. How to use this guide
  2. Architecture diagrams
  3. What is Grafana?
  4. Installation (Docker Compose)
  5. Connecting data sources
  6. Dashboards & panels
  7. Variables & templates
  8. Unified Alerting
  9. Plugins & user/organization management
  10. Frequently asked questions
  11. Next steps

How to use this guide

How to read it

Understanding Grafana as a real-world workflow

Visualize metrics, logs, and traces in a single dashboard with Grafana. Learn through practical examples: connecting data sources, building panels, variables, Unified Alerting, and provisioning (dashboards as code). Rather than listing concepts, this guide is organized so you can follow the content in the order you have to make decisions on a real project.

Key perspective

Infrastructure / operations

Rather than memorizing install commands, understand the order in which traffic, runtime, observability, and incident response connect.

Building dashboards & panelsData source provisioningVariable-driven dashboard templatesUnified AlertingUser/organization permission management

Architecture diagrams

To make what you read stick, it helps to capture the flow as a picture first. The two diagrams below are reference maps you can keep coming back to while learning Grafana.

Learning flow

Rendering diagram…

Architecture view

Rendering diagram…

What is Grafana?

When you first open Grafana, the big picture matters more than individual commands. This section starts with the problems the concepts ahead were created to solve.

Grafana is a pure visualization layer that stores no data. Its only job is to send queries in real time to dozens of kinds of data sources β€” Prometheus (metrics), Loki (logs), Tempo (traces), MySQL, and more β€” and show the results in one dashboard, so start from the premise that responsibility for storing and collecting data always lies with the backend data sources.
ComponentRole
DashboardA visualization screen with several Panels laid out in a grid. Defined as JSON, so it can be version-controlled
PanelA single unit of visualization: a graph, table, gauge, and so on
Data SourceA connection to an external system Grafana runs queries against (Prometheus, Loki, MySQL, and so on)
Alert RuleThreshold monitoring and alerting based on query results (Unified Alerting)
Organization / TeamIsolates dashboards, data sources, and permissions by group

Installation (Docker Compose)

Here you look at Installation (Docker Compose) alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Grafana runs standalone as well, but mounting the provisioning volume alongside restores the data sources and dashboards automatically even when the container is recreated. It is safer to force the initial login password to be changed.
docker-compose.ymlYAML
services:
  grafana:
    image: grafana/grafana-oss:11.0.0
    ports: ["3000:3000"]
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_USERS_ALLOW_SIGN_UP=false
    volumes:
      - grafana-data:/var/lib/grafana
      - ./provisioning:/etc/grafana/provisioning   # automatic registration of data sources and dashboards

volumes:
  grafana-data:
BASH
docker compose up -d
# Open http://localhost:3000 (initially admin/admin; a password change is required on first login)

Connecting data sources

Here you look at Connecting data sources alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

You can register one directly in the UI through Connections β†’ Data sources β†’ Add data source, but declaring it in YAML with provisioning lets you deploy the same configuration repeatedly across environments and track the change history in Git.
provisioning/datasources/datasources.ymlYAML
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://prometheus:9090
    isDefault: true
    jsonData:
      timeInterval: 15s

  - name: Loki
    type: loki
    access: proxy
    url: http://loki:3100

  - name: MySQL
    type: mysql
    url: mysql:3306
    database: appdb
    user: readonly
    secureJsonData:
      password: "${MYSQL_PASSWORD}"

Dashboards & panels

Here you look at Dashboards & panels alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

A dashboard is a grid layout of several Panels. The choice of panel type decides how well the meaning of the data comes across, so it is best to settle first whether to show a trend or highlight the current value, and then pick the type.
Panel JSON (Panel β†’ Edit β†’ JSON Model)JSON
{
  "type": "timeseries",
  "title": "Requests (per minute)",
  "targets": [
    { "expr": "sum(rate(http_requests_total[1m])) by (status)", "legendFormat": "{{status}}" }
  ],
  "fieldConfig": {
    "defaults": { "unit": "reqps", "custom": { "drawStyle": "line", "fillOpacity": 15 } }
  },
  "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }
}
Panel typeUse
Time seriesTime-axis graph β€” trends such as CPU and request counts
StatHighlights a single value (current number of connected users and so on)
Gauge / Bar gaugeThe current value against a threshold (disk usage and so on)
TableLogs and aggregation results in tabular form
HeatmapVisualizes the density of values, such as a response time distribution

Tip

  • For a quick start, enter a community dashboard ID under Dashboards β†’ New β†’ Import.
  • 1860 = Node Exporter Full, 315 = Kubernetes cluster monitoring, 7362 = MySQL Overview

Variables & templates

Here you look at Variables & templates alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

With variables, a single dashboard can be reused across many servers, services, and namespaces by switching with a dropdown. Considering that before variables the same dashboard had to be duplicated once per server, this is a core feature that cuts maintenance cost considerably.
Dashboard Settings β†’ VariablesTEXT
Name: instance
Type: Query
Data source: Prometheus
Query: label_values(up, instance)
Multi-value: true
Include All option: true

# Using the variable in a panel query
sum(rate(http_requests_total{instance=~"$instance"}[5m]))

# The variable can be used in the dashboard title too
title: "Request overview β€” $instance"

Unified Alerting

Here you look at Unified Alerting alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Unified Alerting in Grafana 9+ manages alert rules and delivery channels in Grafana itself, separately from the Prometheus AlertManager. Keeping contact points (delivery channels) and notification policies (label-based routing) separate lets you manage changes to alert content and changes to recipients independently of each other.
Alert rule (Alerting β†’ Alert rules β†’ New)YAML
Query: sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))
Condition: WHEN last() OF query IS ABOVE 0.05
Evaluate every: 1m   For: 5m   # Firing once it persists for 5 minutes

# Contact point β€” Slack
Type: Slack
Webhook URL: https://hooks.slack.com/services/xxx/yyy/zzz

# Notification policy β€” routing by label matching
Matching labels: severity=critical
Contact point: slack-oncall
Group by: alertname, cluster

Tip

  • If you have already built Prometheus + AlertManager, using only one of the two is recommended to avoid split alerting.
  • For the AlertManager routing tree and inhibition rule settings, see the AlertManager alerts section of the Prometheus guide.

Plugins & user/organization management

Here you look at Plugins & user/organization management alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

An Organization is the top-level unit in which dashboards and data sources are fully isolated, and a Team is the unit inside an organization for granting folder and dashboard permissions by group. The more services you have, the more designing folder permissions by team up front reduces permission issues later.
Installing pluginsBASH
# Install a plugin (e.g. Pie Chart)
grafana-cli plugins install grafana-piechart-panel

# In a Docker environment, install through an environment variable
GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-clock-panel
Permission scopeDescription
OrganizationThe top-level isolation unit that dashboards and data sources belong to
TeamA group of users within an organization. Folder/dashboard permissions are granted per team
Role (Viewer/Editor/Admin)The base permission level per user
Folder permissionsFine-grained view/edit permissions per team/user, by folder

Grafana: frequently asked questions

Does Grafana store data itself?

No. Grafana is a visualization tool that queries data sources such as Prometheus, log stores, and databases and draws the results. What Grafana stores is dashboard definitions, users, and alert settings.

Which metrics should go on a dashboard first?

Start with metrics that show what users experience. For a service that is request rate, error rate, and response time; for resources it is utilization and saturation. Rather than putting everything on one screen, separate an overview of the whole service from detail views for narrowing down a cause.

Can I manage dashboards as code?

Yes. Dashboards can be exported as JSON, and provisioning loads dashboards and data sources from files automatically. Versioning them in a repository keeps a change history and lets you restore the same dashboards immediately in a new environment.

Next steps

This section covers Next steps from a practical perspective. Instead of memorizing the concept, focus on the situations in which you would reach for it.

πŸš€
Advanced Grafana roadmap

β€’ Grafana Loki: log collection and search β€” the same label model as Prometheus
β€’ Grafana Tempo: distributed tracing, Jaeger/Zipkin compatible
β€’ Grafana Cloud: a managed SaaS combining Prometheus + Loki + Tempo + Grafana
β€’ Terraform Provider: manage dashboards/data sources/alert rules as IaC

Related guides: Prometheus guide Β· Kubernetes guide Β· Docker guide
← Previous guidePrometheus