Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

What Is Grafana?

Learn what Grafana is, what problems it solves, how it turns metrics, logs and traces into dashboards and alerts, and what you will build in this course.

Every running system produces numbers and text: CPU load, request counts, error messages, temperatures from a sensor, sales per hour. Left in a database or a log file, that data is hard to use. Grafana is an open-source web application that connects to those stores, asks them questions, and shows the answers as graphs, tables, gauges and maps on dashboards. It can also watch the same data and send you a message when something looks wrong.

Grafana does not store your data. It is a window onto other systems. That one idea explains most of how it works, and it is why a single Grafana can show a Prometheus metric, a MySQL table and a Loki log stream side by side.

Grafana is a server application, so it cannot run inside this website. Lessons describe menus and workflows precisely and never show invented screenshots or output. Where an idea can be demonstrated with code, the runnable examples are clearly labelled stand-ins: small JavaScript programs that do by hand what Grafana does for you.

What problems Grafana solves

  • Visibility. You see the state of a system at a glance instead of running queries by hand.
  • One place for many sources. Teams often have metrics in one tool, logs in another and business data in a database. Grafana queries all of them from one screen.
  • Faster troubleshooting. Zoom into the minute an incident began, compare graphs, then jump to the matching logs.
  • Proactive alerts. Rules evaluate queries on a schedule and notify people through email, Slack, PagerDuty and other channels.
  • Sharing. A dashboard is a URL. You can give teammates read-only or edit access, embed panels, or export snapshots.

The big picture

flowchart LR
  A["Your systems<br/>servers, apps, devices"] --> B["Data stores<br/>Prometheus, Loki, SQL"]
  B --> C["Grafana<br/>queries + panels"]
  C --> D["Dashboards"]
  C --> E["Alert rules"]
  E --> F["Email, Slack, on-call"]

Your data lives in stores. Grafana queries them on demand and draws the results.

Editions and where it runs

Edition What it is
Grafana OSS Free, open-source (AGPL), self-hosted. This course focuses on it.
Grafana Enterprise Self-hosted with extra data sources, team sync and support.
Grafana Cloud Hosted by Grafana Labs, with a free tier and managed storage for metrics, logs and traces.

The core features you learn here (data sources, panels, variables, alerting, provisioning) are the same in all three.

What a dashboard really contains

A dashboard is a saved JSON document. It lists panels, each with one or more queries against a data source, a visualization type, and layout coordinates. Grafana renders that document in the browser. The stand-in below builds a tiny dashboard description and prints a summary, so you can see how little magic there is.

JS Stand-in: a dashboard is just data

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Metrics, logs and traces

Observability people talk about three kinds of telemetry, and Grafana has a home for each.

  • Metrics are numbers over time (CPU %, requests per second). Cheap to store and ideal for graphs and alerts.
  • Logs are lines of text with timestamps. They explain why something happened.
  • Traces follow one request through many services, showing where time was spent.

You will meet the matching tools in the next lesson.

From raw samples to a graph

When you look at a graph, Grafana asks the source for points between the start and end of the time range, usually grouped into fixed buckets so a month of data does not need millions of pixels. This stand-in averages raw samples into buckets, the same operation a query does.

JS Stand-in: bucketing samples for a graph

Press Run (or Ctrl + Enter) to see the console output here.

No output.

What you will build in this course

You will install Grafana, connect Prometheus, Loki and SQL databases, create every common panel type, write queries and transformations, parameterize dashboards with variables, set up alerting, and finally provision everything as code. The last chapter contains complete projects.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Where does Grafana keep the metrics and logs it displays?

    Grafana queries external data sources on demand. The dashboard stores queries and layout, not the data.
  2. 2. Which edition is free and self-hosted?

    Grafana OSS is open source and you run it yourself.
  3. 3. What is a dashboard, technically?

    Panels, queries, variables and layout are all stored as JSON and rendered by the browser.
  4. 4. Which telemetry type explains why something happened, with timestamped text?

    Logs are timestamped text lines and usually carry the detailed reason; metrics show how much and when.

Summary

  • Grafana visualizes and alerts on data that lives in other systems.
  • It queries data sources on demand and draws panels on dashboards.
  • Dashboards are JSON documents that can be shared and version controlled.
  • Metrics, logs and traces are the three telemetry types it brings together.
  • OSS, Enterprise and Cloud share the same core features.

Next: The Grafana Ecosystem and the LGTM Stack