Skip to main content

Dashboards - Building and Using Grafana Dashboards

Dashboards are the reason you set up this entire stack. This chapter covers importing pre-built community dashboards, building custom panels, and organizing your observability view.


Opening the Dashboard Area

  1. Open Grafana at http://localhost:3000 (or your server IP)
  2. Login with admin / admin123 (or whatever you set)
  3. In the left sidebar, click the grid icon (Dashboards)

Option 1 - Import Community Dashboards (Fastest Way to Start)

Grafana.com hosts thousands of pre-built dashboards. You import them with a single ID number.

Import a Dashboard

  1. Click Dashboards in sidebar
  2. Click New > Import
  3. Enter the dashboard ID number in the "Import via grafana.com" field
  4. Click Load
  5. Select your data source when prompted (e.g., Prometheus)
  6. Click Import

Best Dashboard IDs to Import

Node Exporter Full (host metrics - CPU, RAM, disk, network):

  • ID: 1860
  • Data source: Prometheus
  • This is the most popular Linux server dashboard on Grafana.com

Node Exporter Full (alternative, cleaner layout):

  • ID: 11074
  • Data source: Prometheus

Prometheus Stats (monitor Prometheus itself):

  • ID: 3662
  • Data source: Prometheus

Docker Containers (if you run Docker):

  • ID: 193
  • Data source: Prometheus

Loki Dashboard:

  • ID: 13639
  • Data source: Loki

Node.js Application Dashboard (prom-client metrics):

  • ID: 11159
  • Data source: Prometheus

Tempo / Traces Dashboard:

  • ID: 16098
  • Data source: Tempo

Option 2 - Build a Custom Dashboard

Create a New Dashboard

  1. Click Dashboards > New > New Dashboard
  2. Click Add visualization
  3. Choose a data source (Prometheus, Loki, or Tempo)
  4. Build your panel using the query editor

Panel Types

Panel TypeBest Used For
Time seriesMetrics over time (CPU, requests/sec)
StatSingle current value (uptime, total requests)
GaugePercentage-style display (disk usage %)
Bar chartComparing values (requests per endpoint)
LogsLog stream output from Loki
TableMultiple values in rows (top slow endpoints)
Node graphService dependency map
TracesTempo trace explorer

Essential Panels to Build

Panel 1 - CPU Usage (Time Series)

Data source: Prometheus Query (PromQL):

100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)

Title: CPU Usage % Unit: Percent (0-100) Alert threshold: 80

Panel 2 - Memory Available (Stat)

node_memory_MemAvailable_bytes / 1024 / 1024 / 1024

Title: Available RAM Unit: Gigabytes Min value: 0

Panel 3 - Disk Usage (Gauge)

100 - ((node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"}) * 100)

Title: Disk Usage Unit: Percent Thresholds: 70 = yellow, 85 = red

Panel 4 - HTTP Request Rate (Time Series)

If your app exposes prom-client metrics:

rate(healthtune_http_request_duration_seconds_count[5m])

Title: Requests per Second Unit: Requests/sec

Panel 5 - Error Rate (Time Series)

rate(healthtune_http_request_duration_seconds_count{status=~"5.."}[5m])

Title: 5xx Errors per Second Unit: Errors/sec

Panel 6 - P95 Response Time (Time Series)

histogram_quantile(0.95, rate(healthtune_http_request_duration_seconds_bucket[5m]))

Title: P95 Latency Unit: Seconds

Panel 7 - Live Logs (Logs Panel)

Data source: Loki Query (LogQL):

{app="healthtune_api"}

Title: HealthTune Live Logs Set Deduplication to Exact to remove duplicate log lines

Panel 8 - Error Logs Only (Logs Panel)

{level="error"}

Title: All Service Errors This shows errors from ALL services in one panel


Organize Your Dashboard

Add Rows (Section Headers)

In the dashboard, click Add > Row. Use rows to group related panels:

  • Row: Server Health (CPU, RAM, Disk panels)
  • Row: HealthTune API (request rate, errors, latency)
  • Row: TrackX API (same metrics for TrackX)
  • Row: Logs (log panels)

Dashboard Variables (Dynamic Dropdowns)

Add a variable to switch between apps without editing queries.

  1. In dashboard settings (gear icon), click Variables > New Variable
  2. Settings:
    • Type: Custom
    • Name: app
    • Label: Application
    • Values: healthtune_api,trackx_api
  3. Save

Then use the variable in your LogQL queries:

{app="$app"}

Now a dropdown appears at the top of the dashboard to switch between apps.

Set Auto-Refresh

In the top-right corner of the dashboard, set the refresh interval:

  • 30s for development
  • 1m or 5m for production dashboards

Explore - Ad-Hoc Queries

Grafana Explore mode lets you run one-off queries without building a dashboard panel. Perfect for debugging.

Explore with Prometheus

  1. Click Explore (compass icon in sidebar)
  2. Select Prometheus
  3. Type PromQL query:
node_load1

See the 1-minute load average over the last hour.

Explore with Loki

  1. Select Loki
  2. Use Label filters to pick app = healthtune_api
  3. Or type LogQL directly:
{app="healthtune_api"} |= "error" | json | level="error"

Explore with Tempo (Find a Trace)

  1. Select Tempo
  2. Query type: Search
  3. Service name: healthtune_api
  4. Min duration: 500ms (find slow requests)
  5. Click Run query
  6. Click any result to see the full trace waterfall

Save and Share Dashboards

Save a Dashboard

Click the floppy disk icon (Save dashboard) in the top right. Add a name and optional description.

Export a Dashboard as JSON

  1. Dashboard settings (gear icon) > JSON Model
  2. Copy the JSON or click Download JSON
  3. This lets you commit your dashboards to Git or import them on another Grafana instance

Import Dashboard from JSON

  1. Dashboards > New > Import
  2. Paste JSON or upload .json file
  3. Click Import

Share a Panel or Dashboard

Click the share icon (arrow leaving box) on any panel to get:

  • A direct URL to the panel at a specific time range
  • An embed code for iframes
  • A snapshot (public read-only version, no login required)

Mark Your Main Dashboard as Home

  1. Open the dashboard you want as your home screen
  2. Click the star icon to favorite it
  3. Go to Grafana Settings (gear in bottom-left sidebar) > Default preferences
  4. Set Home Dashboard to your dashboard

Now every login lands directly on that dashboard.