Skip to content

Reference

query

Fields of a query variable.

Example

{
  "name": "pod",
  "type": "query",
  "datasource": "prom",
  "multi": true,
  "includeAll": true,
  "query": "label_values(http_requests_total{service=\"checkout\"}, pod)"
}

From spec/examples/checkout-service-health.json.

Fields

Field Type Description
name (required) variableName Referenced in queries as $name, ${name} or ${name:format}.
label string
description string
hide "label", "variable"
skipUrlSync boolean The variable’s value is not read from or written to the URL.
type (required) "query"
datasource (required) datasourceRef A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType.
query (required) query
regex string
sort "alpha", "alphaDesc", "num", "numDesc", "alphaCaseInsensitive", "alphaCaseInsensitiveDesc", "natural", "naturalDesc"
refresh "load", "timeRange" or "never"
staticOptions array of object Options offered next to the query results. At most 50 items.
staticOrder "before", "after", "sorted" Where staticOptions go: before the query results (the default), after them, or merged and sorted with the variable’s sort.
allowCustomValue boolean
multi boolean
includeAll boolean
allValue string
default selection Default selection: one value, several for a multi variable, or $__all.

Generated from spec/schema/observespec.v0.json at bac0fe39. Report a problem.

/observeOpen source under Apache-2.0.Grafana is a trademark of Grafana Labs. SlashObserve is not affiliated with or endorsed by Grafana Labs.

Search pages and headings.