Dashboard spec reference
A dashboard is a JSON document: {"version": 1 or 2, "variables": [], "panels": [...], ...}. Version 2 only adds optional fields, so one schema covers both. The server stores the text you send verbatim (key order included) and refuses a spec that breaks a rule below, naming the path of the problem (panels[3].grid).
JSON Schema
GET /v1/projects/{prj}/dashboards/spec-schema returns the JSON Schema (draft 2020-12, application/schema+json). Use it in your editor or in CI to catch mistakes before an import. It checks shapes, names and enums; the rules in "Rules the schema cannot say" are checked only by the server.
Top level
Field | Type | Meaning |
|---|---|---|
| 1 or 2 | Required. |
| array, at most 200 | Required. The tiles. |
| array | Template variables, usable as |
| array | Rows and tabs that group panels. |
| object | Ad-hoc filters: |
| array |
|
| object | Dashboard-wide settings. |
| object | Field display options every panel starts from. |
Unknown fields are refused. The whole document is at most 256 KiB.
Panel
Field | Meaning |
|---|---|
| Required. |
| Required, at most 200 characters. |
| Required. One of the panel types below. |
| Required. |
| Required. |
| Free object read by the panel type (unit, thresholds, legend, and so on). |
| Further queries A, B, ... and expressions over them; |
| Steps run on the result frames, in order. |
| Display options of the result fields, laid over the spec's |
| Click-through links, buttons (at most 5) that POST to an allowed host, a live channel. |
| One copy per selected variable value; the row or tab it belongs to; a range such as |
| The library panel or powerpack the panel comes from. |
Panel types
Series and tables:
timeseries,table,histogram,stat,gauge,barchart,heatmap,statetimeline,statushistory,trend,candlestick,scatter,toplist,pie,donut,treemap,sankey,changeLogs and traces:
logs,logstable,logstream,traces,tracelist,waterfall,flamegraph,servicemap,nodegraph,profile_metricPlatform data:
sql,rum,slo,alertlist,incident_stats,integration_health,activity_stats,cost_per,annolist,dashlistLayout and content:
markdown,image,iframe,canvas,geomapplugin: a frontend panel plugin.
Query kinds
promql, logs, traces, sql, profile_metric, rum, plugin, cost_per, incident_stats, activity, cloud. text is the query string. For profile_metric, rum, plugin and cloud it is a JSON object written as a string (for example {"plugin": "name", "query": "..."}). A logs panel takes a logs query, traces a traces query, sql a sql query, and most other panels a promql query. A plugin or cloud query can feed a timeseries, table or stat panel (a plugin query also a logs panel). table accepts any kind.
Variables
name (a-z, 0-9, _, -, starts with a letter, at most 64, unique) and type:
Type | Options come from |
|---|---|
|
|
|
|
| The project's own values |
|
|
|
|
| Data sources listed in |
| The viewer's own |
|
|
| Label names in |
Optional: label, default, multi, include_all, all_value, regex, sort (none, alpha, alpha_desc, num, num_desc), depends_on, scope, refresh (load or time), server_bound.
Sections
{id, title, kind: "row" | "tab", collapsed?, parent?, repeat?, visible_when?}. Sections nest through parent, to a limited depth.
Rules the schema cannot say
Panel ids and variable names are unique.
A panel's query kind must fit its type (see Query kinds).
customvariables needoptions;queryvariables needquery;optionsonly oncustomandqueryonly onqueryvariables.A
repeatnames an existing multi or all variable; asectionnames an existing section.Query texts are 1 to 4096 bytes.
See also powerpacks.