Back to docs
Recipe

Recipe: Grafana dashboard JSON writer

Generate a complete Grafana dashboard JSON payload from Meridian telemetry, ready for import into any Grafana instance.

Overview

Meridian exports structured telemetry that maps directly to Grafana's dashboard model. This recipe walks through constructing a valid dashboard JSON with panels, templating variables, and time-series queries wired to your Meridian data source.

Prerequisites

  • Meridian agent running with telemetry export enabled
  • Grafana 10.x or later
  • JSON-aware editor (VS Code, vim, or similar)

Step 1 — Dashboard skeleton

Start with a minimal dashboard object containing uid, title, and empty panels array. Set schemaVersion to 39.

Step 2 — Add time-series panels

For each Meridian metric (CPU, memory, injection latency), create a panel with type: "timeseries". Wire the targets array to your Meridian-compatible data source UID.

Step 3 — Templating variables

Define a templating.list entry for hostname so operators can filter across machines without editing panel queries.

Step 4 — Validate and import

Paste the completed JSON into Grafana's “Import dashboard” screen. Verify all panels render and variables resolve before saving.

Need the full reference? See the telemetry schema page for every exported field.