Workshop · hands-on

DevOps Essentials — Monitoring & Observability Lab

Build your own monitoring dashboard in Grafana, powered by Prometheus metrics collected with the node exporter. You will log in, create a dashboard, and add live panels for CPU usage, server uptime and memory usage — no terminal needed, everything happens in the Grafana UI.

← All courses
0 / 5 done
EXERCISE 1

Log in & create your dashboard

Get into Grafana and set up your own personal, empty dashboard.

Log in to Grafana & create your dashboard
Sign in to the workshop Grafana instance and create the empty dashboard you will fill with panels in the next exercises.
GRAFANA
1. Open the Grafana instance in your browser and log in

Use the Grafana URL provided by the instructor (e.g. http://<grafana-server>:3000), then sign in with the username and password the instructor gave you and press Log in.

2. Open the Dashboards section

In the left-side menu, open Dashboards (the four-squares icon). If the menu is collapsed, first click the ☰ hamburger icon at the top-left to expand it.

3. Create a new dashboard

Click New (top-right) and choose New dashboard. The new dashboard opens with a prompt to add your first panel.

4. Save it with your name

Click the Save dashboard icon (floppy disk, top-right), name it workshop-<your_name> and press Save.

Why your own dashboard? Everyone works in parallel — naming it workshop-<your_name> keeps dashboards apart and easy to demo at the end.
EXERCISE 2

CPU usage panel — time series graph

Add your first panel: a live graph of CPU usage, fed by node exporter metrics through PromQL.

Create a CPU usage panel (time series)
Add a visualization to your dashboard and query CPU usage with PromQL using the node exporter metric node_cpu_seconds_total.
GRAFANA
1. Switch the dashboard to edit mode

Click the Edit (pencil) icon in the top-right of the dashboard — panels can only be added and changed while the dashboard is in edit mode.

2. Add a new panel

In the dashboard top bar, click + Add and choose Visualization — this opens the panel editor. (On a brand-new dashboard you can also use the + Add visualization button in the middle of the page.)

3. Click “Configure visualization”

In the panel preview area, click the Configure visualization link that appears in the middle of the empty panel — this is where you connect the data and set up the panel.

4. Select the Prometheus data source

In the panel editor, pick Prometheus from the data source dropdown at the top of the query editor. The preview updates as soon as the source is chosen.

5. Enter the PromQL query

Paste this query in the query box — it calculates the CPU usage percentage per server (everything that is not idle):

PromQL
100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
How it works: node_cpu_seconds_total{mode="idle"} counts seconds CPUs spent idle. rate(...[5m]) is the idle growth per second over the last 5 minutes — subtracting it from 100 gives the busy percentage. avg by (instance) averages across all cores of each server.
6. Title the panel

On the right side, set the panel Title to CPU Usage (%). The default panel type (Time series) is exactly what we want for a graph.

7. Set the unit to Percent

Still on the right: Standard options → Unit → choose Percent (0-100), so the axis reads % instead of raw numbers.

8. Save the panel

Click Apply (back arrow, top-right of the panel editor) to place the panel on your dashboard, then click the Save dashboard icon (floppy disk) and press Save in the dialog.

9. Back to dashboard view

The panel editor is closed — you are back on the dashboard view with your CPU panel in place. Time for the next panel!

EXERCISE 3

Server uptime — gauge panel

A different panel type for a different kind of question: how many monitored servers are up and how many are down?

Create a “Servers up / down” gauge
Add a gauge panel that counts the monitored servers reporting to Prometheus, using up — the built-in health metric.
GRAFANA
1. Insert a new panel: Prometheus data source + Gauge type

You know the drill from the previous exercise: enter edit mode, add a new Visualization and click Configure visualization. Then, in the panel editor, select Prometheus as the data source (top of the query editor) and, in the same view, switch the visualization type (top-right) to Gauge. One screenshot can show both selections:

2. Add the PromQL for the servers UP and run it

Paste this first query — it counts the targets that are currently up — and press Run query:

PromQL
count(up == 1)
How it works: up is a special metric Prometheus generates for every scrape target: 1 means the target responded, 0 means it is down. count(up == 1) returns how many servers are healthy right now.
3. Add a second query for the servers DOWN and run it

Click + Query, paste the query below, and press Run query again:

PromQL
count(up == 0)
4. Name the gauges
  1. Name the first gauge: in the query editor, under query A (count(up == 1)), find the Legend field and type Up. The name appears as a label under the gauge.
  2. Name the second gauge: under query B (count(up == 0)), set the Legend field to Down.
What just happened? The Legend names label each gauge — Up shows how many servers are healthy, Down shows how many are offline. The Down gauge sitting at 0 is exactly what you want to see.
5. Save the panel and go back to the dashboard

Set the Title to Servers up / down, click Apply to close the panel editor, and save the dashboard with the floppy icon. You know how — no screenshot needed for this one.

EXERCISE 4

Memory usage — bar chart panel

Instead of building a panel from scratch, you will duplicate the CPU panel and turn it into a network traffic panel — exactly how real dashboards grow.

Create a combined network traffic panel
Duplicate the CPU panel, then replace its query with a PromQL that sums the network traffic of all servers using node_network_receive_bytes_total.
GRAFANA
1. Duplicate the CPU panel

Enter edit mode again, hover over your CPU Usage (%) panel and open its menu (⋮) → choose More → Duplicate. A second identical panel appears right next to it — same query, same settings, zero work.

2. Edit the duplicated panel

Hover over the duplicated panel, open its menu (⋮) → click Edit. The panel editor opens with everything already in place — query, data source and panel type.

3. Replace the query — combined network traffic

Replace the PromQL in the query box with this — it sums the received network traffic (bytes per second) of all servers:

PromQL
sum(rate(node_network_receive_bytes_total{device!~"lo"}[5m]))
How it works: node_network_receive_bytes_total counts received bytes per network interface. rate(...[5m]) converts it to bytes per second, and sum(...) adds all servers (and interfaces) together into one number. The {device!~"lo"} filter excludes the loopback interface — traffic to itself doesn’t count.
4. Change the title

On the right side, change the panel Title from CPU Usage (%) to Network Traffic — all servers (no unit suffix — the unit setting from the next step takes care of the formatting).

5. Change the unit from Percent to Mbps

Still on the right side, find Standard options → Unit. It currently says Percent (0-100) — inherited from the CPU panel. Click it and choose bits/sec (SI) (or type bits/sec in the search box). Grafana then formats the raw byte values as Kbps / Mbps automatically, matching the new title.

6. Save and back to the dashboard

Click Apply, then save the dashboard with the floppy icon. Back on the dashboard view you have four panels — graph, gauge, bar chart and network traffic. Your first observability dashboard is complete.

EXERCISE 5

Import a ready-made node exporter dashboard

You built panels by hand — now let the community do the heavy lifting: import the most popular node exporter dashboard from grafana.com.

Import a node exporter dashboard
Dashboards are just JSON — and grafana.com hosts thousands shared by the community. Import the classic Node Exporter Full dashboard by ID and get 30+ panels in seconds.
GRAFANA
1. Find the dashboard on grafana.com

Open grafana.com/grafana/dashboards/1860 in your browser. This is Node Exporter Full — the most popular node exporter dashboard. Note the dashboard ID shown on the page: 1860.

2. Open the import dialog in Grafana

Back in Grafana: left-side menu → Dashboards → click the New button → choose Import.

3. Import via grafana.com

In the Import via grafana.com field, type the ID 1860 and click Load. Grafana downloads the dashboard definition for you.

4. Give it a unique name and import

On the import options screen, set a unique Name (e.g. Node Exporter Full — workshop), leave the Unique identifier (uid) field empty so Grafana generates one, then simply click Import. The dashboard connects to your Prometheus data source automatically.

5. Explore the result

The dashboard opens with 30+ panels: CPU per core, memory detail, disk I/O, filesystems, network traffic — everything the node exporter offers. Switch servers with the instance dropdown at the top and compare it with the three panels you built by hand.

Why this matters: importing is how dashboards are shared between teams and with the world. The imported JSON is also a great learning resource — open any panel in edit mode and study the PromQL the community uses.