Skip to content

Reference

adhoc

Fields of a adhoc variable.

Example

{
  "name": "adhoc",
  "type": "adhoc",
  "datasource": "prom",
  "keys": [
    "service",
    "env",
    "pod"
  ],
  "listedValuesOnly": true,
  "baseFilters": [
    {
      "key": "env",
      "operator": "=",
      "value": "prod"
    }
  ],
  "default": [
    {
      "key": "service",
      "operator": "=",
      "value": "checkout",
      "keyLabel": "Service",
      "valueLabel": "Checkout"
    }
  ]
}

From spec/examples/evolved-features.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) "adhoc"
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.
applyToAll true ClickHouse only: also filter every query on this datasource that does not use this variable, on each table the query reads.
default array of adhocFilter At most 20 items.
baseFilters array of adhocFilter Filters always applied to this variable’s queries, ANDed with the selected filters as a whole; never shown and never in the URL. At most 20 items.
keys array of string The keys the filter picker offers instead of asking the datasource. At most 100 items.
listedValuesOnly boolean A filter’s key and value must be picked from the lists the picker shows; absent means any text may be typed.

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.