Grafana is the visualization center of the entire LGTM Stack. This episode discusses server and plugin architecture, UI navigation, how to create your first dashboard and panels, using variables and templating, and the panel types and query editors available.

From episode 4, your local stack is already running. Now it's time to learn the component that is the center of interaction: Grafana. Grafana is the visualization platform that unifies metrics from Mimir, logs from Loki, and traces from Tempo in a single interface.
This episode covers Grafana's architecture, UI navigation, creating your first dashboard and panels, variables and templating, panel types, and the differences between the three query editors: PromQL, LogQL, and TraceQL. After this episode, you'll feel comfortable exploring Grafana on your own.
Grafana runs as a simple web server that loads data source and panel plugins. Its structure:
curl -s http://localhost:3000/api/healthThe api/health endpoint returns the server status along with the Grafana version — the habit of validating via the API will be very helpful when debugging.
After logging in, Grafana's main structure consists of:
Click Dashboards → New → New dashboard, then Add visualization. Select the Mimir data source, and Grafana will open the query editor with an example query. To make sure Mimir has data, start with an empty query and pick any metric available via the dropdown.
up
mimir_ingester_ingested_samples_totalBoth metric names above are real examples; up will always exist because it's generated by the scraping mechanism.
Grafana provides many panel types. The most commonly used:
type: timeseries
fieldConfig:
defaults:
unit: ops
overrides: []
options:
legend:
displayMode: list
tooltip:
mode: multiUsing fieldConfig and options are the two main blocks in every panel's JSON model. Understanding both makes it easy to edit dashboards as code in episode 30.
rate(http_requests_total[5m]). PromQL is covered thoroughly in episode 7.{job="checkout"} |= "error". LogQL is covered in episode 10.{ span.http.status_code >= 500 }. TraceQL is covered in episode 15.The Transformations feature lets you modify query results inside a panel without changing the data source — for example merging two queries or computing a ratio. Meanwhile, Query inspector shows the raw request sent to the backend, useful when a query behaves unexpectedly.
Info
Get into the habit of using Query inspector whenever a query result doesn't make sense. It shows the query duration, the amount of data returned, and the original request — the first information you need when debugging a dashboard.
Variables allow one dashboard to be reused across many contexts. Variable definitions are done in Dashboard settings → Variables. Here's an example service variable that fills a dropdown from a metric label:
name: service
type: query
query: label_values(up, job)With this variable, panel queries become rate(http_requests_total{job="$service"}[5m]), and you can switch services just by changing the dropdown selection. You'll see the pattern {job="$service"} very often in production dashboards.
In episode 5 you understood Grafana's plugin-based architecture for data sources and panels, successfully created your first dashboard and panel, learned eight of the most useful panel types, understood the differences between the PromQL, LogQL, and TraceQL query editors, and used variables for dynamic dashboards.
The key takeaways:
In the next episode 6 we'll discuss metrics with Mimir — the architecture of the distributor, ingester, querier, and store-gateway components, a comparison with Prometheus, and metric types and cardinality considerations. Your empty dashboards will soon be filled with real data.