How to Use Grafana: The Beginner's Guide (First Install, First Data Source, First Dashboard, and Your First Alert)

CodexFuse Team · 2026-10-31T03:57:27.257Z · 12 min read

Learn how to use Grafana: install it with Docker, add Prometheus as your first data source, build your first dashboard, and set your first alert.

How to Use Grafana: The Beginner's Guide (First Install, First Data Source, First Dashboard, and Your First Alert)

Learning how to use Grafana is the fastest way to see what your servers are actually doing. Grafana is an open-source dashboard tool: you point it at a data source like Prometheus, and it turns raw numbers into live graphs, gauges, and tables that refresh on their own. If you have ever SSH'd into a box, run top, and wished the numbers would just draw themselves, this guide is for you. In the next fifteen minutes you will install Grafana with Docker, connect your first data source, build your first dashboard panel with a real query, and set your first alert. No monitoring experience is assumed.

If you are not ready to install anything yet, a hosted website uptime monitor gives you basic up/down checking with zero setup. Grafana is the next step after that: instead of just knowing your site is up, you see CPU, memory, and request traffic as living charts.

What is Grafana, and what do beginners use it for?

Grafana is an open-source analytics and visualization web application. It queries data sources — Prometheus, InfluxDB, MySQL, Loki, and dozens more — and displays the answers as dashboards made of panels: time-series graphs, gauges, bar charts, tables, and heatmaps. Beginners use it for one job above all: watching a server or an app and spotting trouble before users do. The current release is Grafana 13.3.0 (October 27, 2026), and the self-hosted edition is free and open source.

The most important mental model to adopt early is that Grafana stores almost nothing itself. It does not collect your metrics; it asks. Prometheus (or whichever data source you pick) does the collecting on a schedule, and Grafana sends it a query every time a panel refreshes. That separation is why the same Grafana dashboard can show server metrics from Prometheus, business numbers from MySQL, and log volume from Loki side by side.

What do you need before you start?

You need a machine with Docker installed and about 512 MB of free memory — the official minimum for running Grafana. A laptop, a home-lab box, or a small VPS all work; this guide uses a single Docker host for everything. If you have never used containers, read the Docker beginner guide first, because every command below assumes Docker is installed and running.

You also need a modern browser (Chrome, Firefox, Safari, or Edge — JavaScript must be enabled), and it helps to have a second terminal tab open for Prometheus. Nothing else: no database to configure, no config files to write, no DNS.

How do you install Grafana for the first time?

Docker is the fastest first install: one command pulls the image and starts Grafana on port 3000. Run this on your Docker host:

docker run -d --name=grafana -p 3000:3000 \
  -v grafana-data:/var/lib/grafana \
  grafana/grafana

The -v grafana-data:/var/lib/grafana flag stores dashboards and settings in a named volume, so your work survives a container restart. Without it, deleting the container deletes everything you built — the classic beginner mistake. Give it ten seconds to start, then open http://localhost:3000 in your browser (use your server's IP instead of localhost if Grafana runs on a remote box).

Log in with the default credentials admin / admin. Grafana asks you to change the password on first login — do it now, not later, because an internet-facing Grafana with admin/admin gets found by scanners within hours. If you prefer a native install instead of Docker, Ubuntu and Debian users can use the APT repository (sudo apt-get install grafana, then sudo systemctl start grafana-server), and macOS users can run brew install grafana followed by brew services start grafana.

What is a Grafana data source, and which one should a beginner pick?

A data source is Grafana's connection to wherever your numbers live. You tell Grafana the type (Prometheus, MySQL, InfluxDB, and many more) plus how to reach it, and from then on every panel on every dashboard can query it. A single Grafana instance can hold many data sources at once, and a single dashboard can mix them — that is the whole point of the tool.

As a beginner, pick Prometheus. Every mainstream Grafana tutorial assumes it, every community dashboard template expects it, and it ships with its own metrics the moment it starts, so your first queries work with zero instrumentation. The other honest option is the built-in TestData source, which generates fake series for learning the UI — fine for clicking around, but you will not monitor anything real with it. Start with Prometheus; you can add a database source later when you have business data worth charting.

How do you add Prometheus as your first data source?

First, run Prometheus itself in Docker. The official image ships with a default configuration that scrapes its own metrics, so it is queryable the second it starts:

docker run -d --name=prometheus -p 9090:9090 prom/prometheus

Now add it to Grafana. Click the Grafana icon in the top menu to open the side menu, head to Data Sources, and choose Add your first data source. Select Prometheus from the list. In the URL field, enter where Grafana can reach Prometheus. This is the step beginners get wrong: if Grafana itself runs in Docker, http://localhost:9090 means "inside the Grafana container," where nothing listens. Use your host's LAN IP instead, for example http://192.168.1.10:9090 (swap in your machine's actual address).

Leave everything else at defaults and click Save & Test. Grafana should answer "Successfully queried the Prometheus API." That message is your green light: the connection works, and every query you write from now on runs against real data.

How do you build your first Grafana dashboard?

A dashboard is just a saved arrangement of panels, and a panel is one query plus one visualization. The current click path, straight from the official docs, is: click Dashboards in the main menu, then New, then New dashboard. Click the blue-plus Add new element icon and click or drag a panel onto the empty canvas. On the new panel, choose Configure visualization to open the panel editor with your default data source preselected.

In the Queries tab, make sure the Data source drop-down shows your Prometheus, then type your first query in the PromQL box:

up

Click Refresh and Grafana draws the result. up is the perfect first query: Prometheus records a 1 for every scrape target it can reach, so you should see a flat line at 1 labeled with the Prometheus job itself. It proves the whole chain — Prometheus scraped, Grafana queried, the panel rendered — with a query you cannot get wrong.

Pick a visualization from the suggestions (Time series is the default and the right one here), give the panel a title like "Targets up," and click Save. Then save the dashboard itself with a name like "My first dashboard" and click Exit edit. You now own a real monitoring dashboard.

What PromQL query should your first panels use?

After up, the next safe queries are the process metrics Prometheus exposes about itself. They exist on every default install, so they work for every reader of this page. This table is your starter set — each row is a real query you can paste into a new panel today:

What you want to seeThe exact queryWhat it tells you
Is anything being scraped?up1 = target reachable, 0 = target down
How busy is Prometheus's CPU?process_cpu_seconds_totalTotal CPU seconds consumed; rising slope means rising load
How many requests is it serving?prometheus_http_requests_totalCounter of HTTP requests; use with rate() for per-second

Two habits will save you later. First, always check what a metric actually is before charting it: counters like prometheus_http_requests_total only make sense wrapped in rate(...[5m]), because the raw ever-increasing total is a staircase, not a signal. Second, name every panel for the question it answers ("API requests per second"), not the metric it queries — future-you reads dashboards at 3 a.m.

How do you create your first alert without drowning in noise?

An alert is a query that Grafana evaluates on a schedule, plus a condition that fires a notification. Beginners should create exactly one alert first: tell me when a scrape target goes down. Open your "Targets up" panel, go to its Alert tab, and create an alert rule with the condition up == 0 — fire when the last value is 0, meaning Prometheus cannot reach the target.

Set it conservatively: evaluate the rule every 1 minute, and require the condition to hold for 5 minutes before firing. That five-minute pending period is the difference between a useful alert and a 2 a.m. false alarm from a thirty-second network blip. This matters more than any other alerting advice: alert fatigue is real, and the fastest way to stop trusting your monitoring is to let it cry wolf. One reliable alert beats twenty twitchy ones.

Where should the notification go? For a first setup, Grafana's built-in notification policies can email you or post to a webhook; configure one contact point and test it by stopping the Prometheus container for six minutes, then starting it again. Watching the alert fire and resolve teaches you more than any documentation page. If you want a second, independent opinion on whether your services are reachable from the outside, the Uptime Kuma beginner guide covers the self-hosted uptime checker that complements Grafana's inside-the-box metrics.

How do you arrange panels into a dashboard that actually helps?

A useful beginner dashboard has three to five panels and answers one question: "is everything normal?" Put the status panel first — your up query as a Stat panel showing a single big number is ideal at the top. Below it, add the resource panels: CPU and memory time series for the box you care about. Keep the time range modest (last 6 hours) and the refresh at 30 seconds or slower; a dashboard that re-queries every 5 seconds with 30 panels generates serious load for zero extra insight.

Resist vanity graphs. Every panel should map to an action: if this line spikes, I will do X. Panels nobody would act on are decoration, and decoration is how dashboards grow into unreadable wallpaper. When a dashboard earns its keep, export it: dashboard settings offer an export/JSON view you can save to git, which is also how teams share dashboards without screenshots.

Should you use Grafana or Kibana?

Use Grafana for metrics and Kibana for logs — that is the honest one-line answer. Grafana is a multi-source dashboard layer: it queries time-series databases like Prometheus and InfluxDB, SQL databases, and cloud monitoring APIs, and it excels at "show me this number over time." Kibana is the visualization front end for Elasticsearch: it excels at searching, filtering, and aggregating log documents and full-text data.

In practice many teams run both: Prometheus plus Grafana for "is the system healthy," Elasticsearch plus Kibana for "what exactly went wrong." If you are choosing your first observability tool for a server or a home lab, Grafana with Prometheus is the simpler start — metrics are easier to reason about than log pipelines, and this guide just got you running.

What should you do after your first dashboard works?

Three moves, in order. First, make Grafana survive restarts: if you used the Docker command from this guide, the named volume already handles it — verify with docker stop grafana && docker start grafana and confirm your dashboard is still there. Second, put Grafana behind a reverse proxy with HTTPS before exposing it past your LAN, and change that admin password if you skipped it. Third, give it real targets: point Prometheus at your actual servers (each scrape target adds a line to your up panel automatically) and, if you run a home lab, the Proxmox beginner guide shows where that lab lives.

If you would rather skip self-hosting entirely, Grafana Cloud has a free tier (10k Prometheus series, 50 GB of logs and 50 GB of traces) that removes the install step — the dashboard-building skills from this guide transfer directly, because the UI is the same.

Sources

Frequently asked questions

Is Grafana free?

Yes. Grafana's self-hosted open-source edition is free, and the current 13.x line is what this guide installs. Grafana Labs also sells Enterprise features and a hosted Cloud product, which has a free tier (10k metrics series, 50 GB logs, 50 GB traces). Nothing in this guide needs a paid plan.

What is the default Grafana username and password?

Both are admin. On your first login at http://localhost:3000, Grafana prompts you to change the password — do it immediately, especially before exposing Grafana to the internet.

Do I need Prometheus to use Grafana?

No, but it is the best first choice. Grafana works with dozens of data sources — MySQL, PostgreSQL, InfluxDB, Elasticsearch, cloud monitoring APIs, and a built-in TestData generator for learning. Prometheus is recommended for beginners because its default install exposes its own metrics instantly, so your first queries work with no extra setup.

How much RAM does Grafana need?

The official minimum is 512 MB of memory and 1 CPU core, which is fine for learning. The documented small-deployment baseline is 2 cores with 2–4 GB of memory. Remember that Grafana's own footprint is separate from your data sources — Prometheus and friends have their own requirements.

Can Grafana alert me without Prometheus?

Yes. Grafana's unified alerting evaluates a query against any configured data source on a schedule and fires when your condition holds. The up == 0 example in this guide uses Prometheus, but the same alert-rule pattern works with SQL, InfluxDB, or any other source.

Featured on Twelve Tools Launch Llama Tools Launch your MCP