Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
Dashboard
Maturity: experimental
Version: 0.0
A Grafana dashboard.
Property | Type | Required | Default | Description |
---|---|---|---|---|
metadata | object | Yes | metadata contains embedded CommonMetadata and can be extended with custom string fields TODO: use CommonMetadata instead of redefining here; currently needs to be defined here without external reference as using the CommonMetadata reference breaks thema codegen. | |
spec | object | Yes | ||
status | object | Yes |
Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields TODO: use CommonMetadata instead of redefining here; currently needs to be defined here without external reference as using the CommonMetadata reference breaks thema codegen.
It extends _kubeObjectMetadata.
Property | Type | Required | Default | Description |
---|---|---|---|---|
createdBy | string | Yes | ||
creationTimestamp | string | Yes | (Inherited from _kubeObjectMetadata) | |
extraFields | object | Yes | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata | |
finalizers | string[] | Yes | (Inherited from _kubeObjectMetadata) | |
labels | map[string]string | Yes | (Inherited from _kubeObjectMetadata) | |
resourceVersion | string | Yes | (Inherited from _kubeObjectMetadata) | |
uid | string | Yes | (Inherited from _kubeObjectMetadata) | |
updateTimestamp | string | Yes | ||
updatedBy | string | Yes | ||
deletionTimestamp | string | No | (Inherited from _kubeObjectMetadata) |
_kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object’s metadata field. It is not exhaustive and only includes fields which may be relevant to a kind’s implementation, As it is also intended to be generic enough to function with any API Server.
Property | Type | Required | Default | Description |
---|---|---|---|---|
creationTimestamp | string | Yes | ||
finalizers | string[] | Yes | ||
labels | map[string]string | Yes | ||
resourceVersion | string | Yes | ||
uid | string | Yes | ||
deletionTimestamp | string | No |
ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
Property | Type | Required | Default | Description |
---|
Spec
Property | Type | Required | Default | Description |
---|---|---|---|---|
editable | boolean | Yes | true | Whether a dashboard is editable or not. |
graphTooltip | integer | Yes | 0 | 0 for no shared crosshair or tooltip (default). 1 for shared crosshair. 2 for shared crosshair AND shared tooltip. Possible values are: 0 , 1 , 2 . |
schemaVersion | uint16 | Yes | 36 | Version of the JSON schema, incremented each time a Grafana update brings changes to said schema. |
style | string | Yes | dark | Theme of dashboard. Default value: dark. Possible values are: dark , light . |
annotations | AnnotationContainer | No | Contains the list of annotations that are associated with the dashboard. Annotations are used to overlay event markers and overlay event tags on graphs. Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API. See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/ | |
description | string | No | Description of dashboard. | |
fiscalYearStartMonth | integer | No | 0 | The month that the fiscal year starts on. 0 = January, 11 = December Constraint: >=0 & <12 . |
gnetId | string | No | ID of a dashboard imported from the https://grafana.com/grafana/dashboards/ portal | |
id | integer or null | No | Unique numeric identifier for the dashboard.id is internal to a specific Grafana instance. uid should be used to identify a dashboard across Grafana instances. | |
links | DashboardLink[] | No | Links with references to other dashboards or external websites. | |
liveNow | boolean | No | When set to true, the dashboard will redraw panels at an interval matching the pixel width. This will keep data “moving left” regardless of the query refresh rate. This setting helps avoid dashboards presenting stale live data | |
panels | object[] | No | List of dashboard panels | |
refresh | No | Refresh rate of dashboard. Represented via interval string, e.g. “5s”, “1m”, “1h”, “1d”. | ||
revision | integer | No | This property should only be used in dashboards defined by plugins. It is a quick check to see if the version has changed since the last time. | |
snapshot | Snapshot | No | A dashboard snapshot shares an interactive dashboard publicly. It is a read-only version of a dashboard, and is not editable. It is possible to create a snapshot of a snapshot. Grafana strips away all sensitive information from the dashboard. Sensitive information stripped: queries (metric, template,annotation) and panel links. | |
tags | string[] | No | Tags associated with dashboard. | |
templating | object | No | Configured template variables | |
time | object | No | Time range for dashboard. Accepted values are relative time strings like {from: ’now-6h’, to: ’now’} or absolute time strings like {from: ‘2020-07-10T08:00:00.000Z’, to: ‘2020-07-10T14:00:00.000Z’}. | |
timepicker | object | No | Configuration of the time picker shown at the top of a dashboard. | |
timezone | string | No | browser | Timezone of dashboard. Accepted values are IANA TZDB zone ID or “browser” or “utc”. |
title | string | No | Title of dashboard. | |
uid | string | No | Unique dashboard identifier that can be generated by anyone. string (8-40) | |
version | uint32 | No | Version of the dashboard, incremented each time the dashboard is updated. | |
weekStart | string | No | Day when the week starts. Expressed by the name of the day in lowercase, e.g. “monday”. |
AnnotationContainer
Contains the list of annotations that are associated with the dashboard. Annotations are used to overlay event markers and overlay event tags on graphs. Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API. See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/
Property | Type | Required | Default | Description |
---|---|---|---|---|
list | AnnotationQuery[] | No | List of annotations |
AnnotationQuery
TODO docs FROM: AnnotationQuery in grafana-data/src/types/annotations.ts
Property | Type | Required | Default | Description |
---|---|---|---|---|
datasource | DataSourceRef | Yes | Ref to a DataSource instance | |
enable | boolean | Yes | true | When enabled the annotation query is issued with every dashboard refresh |
iconColor | string | Yes | Color to use for the annotation event markers | |
name | string | Yes | Name of annotation. | |
filter | AnnotationPanelFilter | No | ||
hide | boolean | No | false | Annotation queries can be toggled on or off at the top of the dashboard. When hide is true, the toggle is not shown in the dashboard. |
target | AnnotationTarget | No | TODO: this should be a regular DataQuery that depends on the selected dashboard these match the properties of the “grafana” datasouce that is default in most dashboards | |
type | string | No | TODO – this should not exist here, it is based on the –grafana– datasource |
AnnotationPanelFilter
Property | Type | Required | Default | Description |
---|---|---|---|---|
ids | integer[] | Yes | Panel IDs that should be included or excluded | |
exclude | boolean | No | false | Should the specified panels be included or excluded |
AnnotationTarget
TODO: this should be a regular DataQuery that depends on the selected dashboard these match the properties of the “grafana” datasouce that is default in most dashboards
Property | Type | Required | Default | Description |
---|---|---|---|---|
limit | integer | Yes | Only required/valid for the grafana datasource… but code+tests is already depending on it so hard to change | |
matchAny | boolean | Yes | Only required/valid for the grafana datasource… but code+tests is already depending on it so hard to change | |
tags | string[] | Yes | Only required/valid for the grafana datasource… but code+tests is already depending on it so hard to change | |
type | string | Yes | Only required/valid for the grafana datasource… but code+tests is already depending on it so hard to change |
DataSourceRef
Ref to a DataSource instance
Property | Type | Required | Default | Description |
---|---|---|---|---|
type | string | No | The plugin type-id | |
uid | string | No | Specific datasource instance |
DashboardLink
Links with references to other dashboards or external resources
Property | Type | Required | Default | Description |
---|---|---|---|---|
asDropdown | boolean | Yes | false | If true, all dashboards links will be displayed in a dropdown. If false, all dashboards links will be displayed side by side. Only valid if the type is dashboards |
icon | string | Yes | Icon name to be displayed with the link | |
includeVars | boolean | Yes | false | If true, includes current template variables values in the link as query params |
keepTime | boolean | Yes | false | If true, includes current time range in the link as query params |
tags | string[] | Yes | List of tags to limit the linked dashboards. If empty, all dashboards will be displayed. Only valid if the type is dashboards | |
targetBlank | boolean | Yes | false | If true, the link will be opened in a new tab |
title | string | Yes | Title to display with the link | |
tooltip | string | Yes | Tooltip to display when the user hovers their mouse over it | |
type | string | Yes | Dashboard Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource) Possible values are: link , dashboards . | |
url | string | Yes | Link URL. Only required/valid if the type is link |
Snapshot
A dashboard snapshot shares an interactive dashboard publicly. It is a read-only version of a dashboard, and is not editable. It is possible to create a snapshot of a snapshot. Grafana strips away all sensitive information from the dashboard. Sensitive information stripped: queries (metric, template,annotation) and panel links.
Property | Type | Required | Default | Description |
---|---|---|---|---|
created | string | Yes | Time when the snapshot was created | |
expires | string | Yes | Time when the snapshot expires, default is never to expire | |
externalUrl | string | Yes | external url, if snapshot was shared in external grafana instance | |
external | boolean | Yes | Is the snapshot saved in an external grafana instance | |
id | uint32 | Yes | Unique identifier of the snapshot | |
key | string | Yes | Optional, defined the unique key of the snapshot, required if external is true | |
name | string | Yes | Optional, name of the snapshot | |
orgId | uint32 | Yes | org id of the snapshot | |
updated | string | Yes | last time when the snapshot was updated | |
userId | uint32 | Yes | user id of the snapshot creator | |
url | string | No | url of the snapshot, if snapshot was shared internally |
Panels
Property | Type | Required | Default | Description |
---|---|---|---|---|
object | Possible types are: Panel, RowPanel, GraphPanel, HeatmapPanel. |
DataTransformerConfig
Transformations allow to manipulate data returned by a query before the system applies a visualization. Using transformations you can: rename fields, join time series data, perform mathematical operations across queries, use the output of one transformation as the input to another transformation, etc.
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | string | Yes | Unique identifier of transformer | |
options | Yes | Options to be passed to the transformer Valid options depend on the transformer id | ||
disabled | boolean | No | Disabled transformations are skipped | |
filter | MatcherConfig | No | Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation. It comes with in id ( to resolve implementation from registry) and a configuration that’s specific to a particular matcher type. |
MatcherConfig
Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation. It comes with in id ( to resolve implementation from registry) and a configuration that’s specific to a particular matcher type.
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | string | Yes | `` | The matcher id. This is used to find the matcher implementation from registry. |
options | No | The matcher options. This is specific to the matcher implementation. |
FieldConfigSource
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations.
Property | Type | Required | Default | Description |
---|---|---|---|---|
defaults | FieldConfig | Yes | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations. | |
overrides | object[] | Yes | Overrides are the options applied to specific fields overriding the defaults. |
FieldConfig
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations.
Property | Type | Required | Default | Description |
---|---|---|---|---|
color | FieldColor | No | Map a field to a color. | |
custom | object | No | custom is specified by the FieldConfig field in panel plugin schemas. | |
decimals | number | No | Specify the number of decimals Grafana includes in the rendered value. If you leave this field blank, Grafana automatically truncates the number of decimals based on the value. For example 1.1234 will display as 1.12 and 100.456 will display as 100. To display all decimals, set the unit to String . | |
description | string | No | Human readable field metadata | |
displayNameFromDS | string | No | This can be used by data sources that return and explicit naming structure for values and labels When this property is configured, this value is used rather than the default naming strategy. | |
displayName | string | No | The display value for this field. This supports template variables blank is auto | |
filterable | boolean | No | True if data source field supports ad-hoc filters | |
links | No | The behavior when clicking on a result | ||
mappings | ValueMapping[] | No | Convert input values into a display string | |
max | number | No | The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. | |
min | number | No | The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. | |
noValue | string | No | Alternative to empty string | |
path | string | No | An explicit path to the field in the datasource. When the frame meta includes a path, This will default to `${frame.meta.path}/${field.name} When defined, this value can be used as an identifier within the datasource scope, and may be used to update the results | |
thresholds | ThresholdsConfig | No | Thresholds configuration for the panel | |
unit | string | No | Unit a field should use. The unit you select is applied to all fields except time. You can use the units ID availables in Grafana or a custom unit. Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts As custom unit, you can use the following formats: suffix:<suffix> for custom unit that should go after value.prefix:<prefix> for custom unit that should go before value.time:<format> For custom date time formats type for example time:YYYY-MM-DD .si:<base scale><unit characters> for custom SI units. For example: si: mF . This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.count:<unit> for a custom count unit.currency:<unit> for custom a currency unit. | |
writeable | boolean | No | True if data source can write a value to the path. Auth/authz are supported separately |
FieldColor
Map a field to a color.
Property | Type | Required | Default | Description |
---|---|---|---|---|
mode | string | Yes | Color mode for a field. You can specify a single color, or select a continuous (gradient) color schemes, based on a value. Continuous color interpolates a color using the percentage of a value relative to min and max. Accepted values are: thresholds : From thresholds. Informs Grafana to take the color from the matching thresholdpalette-classic : Classic palette. Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizationspalette-classic-by-name : Classic palette (by name). Grafana will assign color by looking up a color in a palette by series name. Useful for Graphs and pie charts and other categorical data visualizationscontinuous-GrYlRd : ontinuous Green-Yellow-Red palette modecontinuous-RdYlGr : Continuous Red-Yellow-Green palette modecontinuous-BlYlRd : Continuous Blue-Yellow-Red palette modecontinuous-YlRd : Continuous Yellow-Red palette modecontinuous-BlPu : Continuous Blue-Purple palette modecontinuous-YlBl : Continuous Yellow-Blue palette modecontinuous-blues : Continuous Blue palette modecontinuous-reds : Continuous Red palette modecontinuous-greens : Continuous Green palette modecontinuous-purples : Continuous Purple palette modeshades : Shades of a single color. Specify a single color, useful in an override rule.fixed : Fixed color mode. Specify a single color, useful in an override rule.Possible values are: thresholds , palette-classic , palette-classic-by-name , continuous-GrYlRd , continuous-RdYlGr , continuous-BlYlRd , continuous-YlRd , continuous-BlPu , continuous-YlBl , continuous-blues , continuous-reds , continuous-greens , continuous-purples , fixed , shades . | |
fixedColor | string | No | The fixed color value for fixed or shades color modes. | |
seriesBy | string | No | Defines how to assign a series color from “by value” color schemes. For example for an aggregated data points like a timeseries, the color can be assigned by the min, max or last value. Possible values are: min , max , last . |
ThresholdsConfig
Thresholds configuration for the panel
Property | Type | Required | Default | Description |
---|---|---|---|---|
mode | string | Yes | Thresholds can either be absolute (specific number) or percentage (relative to min or max, it will be values between 0 and 1).Possible values are: absolute , percentage . | |
steps | Threshold[] | Yes | Must be sorted by ‘value’, first value is always -Infinity |
Threshold
User-defined value for a metric that triggers visual changes in a panel when this value is met or exceeded They are used to conditionally style and color visualizations based on query results , and can be applied to most visualizations.
Property | Type | Required | Default | Description |
---|---|---|---|---|
color | string | Yes | Color represents the color of the visual change that will occur in the dashboard when the threshold value is met or exceeded. | |
value | number or null | Yes | Value represents a specified metric for the threshold, which triggers a visual change in the dashboard when this value is met or exceeded. Nulls currently appear here when serializing -Infinity to JSON. |
ValueMapping
Allow to transform the visual representation of specific data values in a visualization, irrespective of their original units
Property | Type | Required | Default | Description |
---|---|---|---|---|
object | Possible types are: ValueMap, RangeMap, RegexMap, SpecialValueMap. |
RangeMap
Maps numerical ranges to a display text and color. For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | object | Yes | Range to match against and the result to apply when the value is within the range | |
type | string | Yes |
Options
Range to match against and the result to apply when the value is within the range
Property | Type | Required | Default | Description |
---|---|---|---|---|
from | number or null | Yes | Min value of the range. It can be null which means -Infinity | |
result | ValueMappingResult | Yes | Result used as replacement with text and color when the value matches | |
to | number or null | Yes | Max value of the range. It can be null which means +Infinity |
ValueMappingResult
Result used as replacement with text and color when the value matches
Property | Type | Required | Default | Description |
---|---|---|---|---|
color | string | No | Text to use when the value matches | |
icon | string | No | Icon to display when the value matches. Only specific visualizations. | |
index | integer | No | Position in the mapping array. Only used internally. | |
text | string | No | Text to display when the value matches |
RegexMap
Maps regular expressions to replacement text and a color. For example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | object | Yes | Regular expression to match against and the result to apply when the value matches the regex | |
type | string | Yes |
Options
Regular expression to match against and the result to apply when the value matches the regex
Property | Type | Required | Default | Description |
---|---|---|---|---|
pattern | string | Yes | Regular expression to match against | |
result | ValueMappingResult | Yes | Result used as replacement with text and color when the value matches |
SpecialValueMap
Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color. See SpecialValueMatch to see the list of special values. For example, you can configure a special value mapping so that null values appear as N/A.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | object | Yes | ||
type | string | Yes |
Options
Property | Type | Required | Default | Description |
---|---|---|---|---|
match | string | Yes | Special value types supported by the SpecialValueMap Possible values are: true , false , null , nan , null+nan , empty . | |
result | ValueMappingResult | Yes | Result used as replacement with text and color when the value matches |
ValueMap
Maps text values to a color or different display text and color. For example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | map[string]ValueMappingResult | Yes | Map with <value_to_match>: ValueMappingResult. For example: { “10”: { text: “Perfection!”, color: “green” } } | |
type | string | Yes |
Custom
custom is specified by the FieldConfig field in panel plugin schemas.
Property | Type | Required | Default | Description |
---|
Overrides
Property | Type | Required | Default | Description |
---|---|---|---|---|
matcher | MatcherConfig | Yes | Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation. It comes with in id ( to resolve implementation from registry) and a configuration that’s specific to a particular matcher type. | |
properties | DynamicConfigValue[] | Yes |
DynamicConfigValue
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | string | Yes | `` | |
value | No |
GraphPanel
Support for legacy graph panel. @deprecated this a deprecated panel type
Property | Type | Required | Default | Description |
---|---|---|---|---|
type | string | Yes | Possible values are: graph . | |
legend | object | No | @deprecated this is part of deprecated graph panel |
Legend
@deprecated this is part of deprecated graph panel
Property | Type | Required | Default | Description |
---|---|---|---|---|
show | boolean | Yes | true | |
sortDesc | boolean | No | ||
sort | string | No |
GridPos
Position and dimensions of a panel in the grid
Property | Type | Required | Default | Description |
---|---|---|---|---|
h | uint32 | Yes | 9 | Panel height. The height is the number of rows from the top edge of the panel. |
w | integer | Yes | 12 | Panel width. The width is the number of columns from the left edge of the panel. Constraint: >0 & <=24 . |
x | integer | Yes | 0 | Panel x. The x coordinate is the number of columns from the left edge of the grid Constraint: >=0 & <24 . |
y | uint32 | Yes | 0 | Panel y. The y coordinate is the number of rows from the top edge of the grid |
static | boolean | No | Whether the panel is fixed within the grid. If true, the panel will not be affected by other panels’ interactions |
HeatmapPanel
Support for legacy heatmap panel. @deprecated this a deprecated panel type
Property | Type | Required | Default | Description |
---|---|---|---|---|
type | string | Yes | Possible values are: heatmap . |
LibraryPanelRef
A library panel is a reusable panel that you can use in any dashboard. When you make a change to a library panel, that change propagates to all instances of where the panel is used. Library panels streamline reuse of panels across multiple dashboards.
Property | Type | Required | Default | Description |
---|---|---|---|---|
name | string | Yes | Library panel name | |
uid | string | Yes | Library panel uid |
Panel
Dashboard panels are the basic visualization building blocks.
Property | Type | Required | Default | Description |
---|---|---|---|---|
fieldConfig | FieldConfigSource | Yes | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations. | |
options | object | Yes | It depends on the panel plugin. They are specified by the Options field in panel plugin schemas. | |
transformations | DataTransformerConfig[] | Yes | List of transformations that are applied to the panel data before rendering. When there are multiple transformations, Grafana applies them in the order they are listed. Each transformation creates a result set that then passes on to the next transformation in the processing pipeline. | |
transparent | boolean | Yes | false | Whether to display the panel without a background. |
type | string | Yes | The panel plugin type id. This is used to find the plugin to display the panel. Constraint: length >=1 . | |
datasource | DataSourceRef | No | Ref to a DataSource instance | |
description | string | No | Panel description. | |
gridPos | GridPos | No | Position and dimensions of a panel in the grid | |
id | uint32 | No | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. | |
interval | string | No | The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables. This value must be formatted as a number followed by a valid time identifier like: “40s”, “3d”, etc. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
libraryPanel | LibraryPanelRef | No | A library panel is a reusable panel that you can use in any dashboard. When you make a change to a library panel, that change propagates to all instances of where the panel is used. Library panels streamline reuse of panels across multiple dashboards. | |
links | DashboardLink[] | No | Panel links. | |
maxDataPoints | number | No | The maximum number of data points that the panel queries are retrieving. | |
pluginVersion | string | No | The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs. | |
repeatDirection | string | No | h | Direction to repeat in if ‘repeat’ is set.h for horizontal, v for vertical.Possible values are: h , v . |
repeatPanelId | integer | No | Id of the repeating panel. | |
repeat | string | No | Name of template variable to repeat for. | |
tags | string[] | No | Tags for the panel. | |
targets | Target[] | No | Depends on the panel plugin. See the plugin documentation for details. | |
timeFrom | string | No | Overrides the relative time range for individual panels, which causes them to be different than what is selected in the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different time periods or days on the same dashboard. The value is formatted as time operation like: now-5m (Last 5 minutes), now/d (the day so far),now-5d/d (Last 5 days), now/w (This week so far), now-2y/y (Last 2 years).Note: Panel time overrides have no effect when the dashboard’s time range is absolute. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
timeShift | string | No | Overrides the time range for individual panels by shifting its start and end relative to the time picker. For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting 2h .Note: Panel time overrides have no effect when the dashboard’s time range is absolute. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
title | string | No | Panel title. |
FieldConfigSource
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations.
Property | Type | Required | Default | Description |
---|---|---|---|---|
defaults | FieldConfig | Yes | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations. | |
overrides | overrides[] | Yes | Overrides are the options applied to specific fields overriding the defaults. |
FieldConfig
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations.
Property | Type | Required | Default | Description |
---|---|---|---|---|
color | FieldColor | No | Map a field to a color. | |
custom | custom | No | custom is specified by the FieldConfig field in panel plugin schemas. | |
decimals | number | No | Specify the number of decimals Grafana includes in the rendered value. If you leave this field blank, Grafana automatically truncates the number of decimals based on the value. For example 1.1234 will display as 1.12 and 100.456 will display as 100. To display all decimals, set the unit to String . | |
description | string | No | Human readable field metadata | |
displayNameFromDS | string | No | This can be used by data sources that return and explicit naming structure for values and labels When this property is configured, this value is used rather than the default naming strategy. | |
displayName | string | No | The display value for this field. This supports template variables blank is auto | |
filterable | boolean | No | True if data source field supports ad-hoc filters | |
links | No | The behavior when clicking on a result | ||
mappings | ValueMapping[] | No | Convert input values into a display string | |
max | number | No | The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. | |
min | number | No | The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. | |
noValue | string | No | Alternative to empty string | |
path | string | No | An explicit path to the field in the datasource. When the frame meta includes a path, This will default to `${frame.meta.path}/${field.name} When defined, this value can be used as an identifier within the datasource scope, and may be used to update the results | |
thresholds | ThresholdsConfig | No | Thresholds configuration for the panel | |
unit | string | No | Unit a field should use. The unit you select is applied to all fields except time. You can use the units ID availables in Grafana or a custom unit. Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts As custom unit, you can use the following formats: suffix:<suffix> for custom unit that should go after value.prefix:<prefix> for custom unit that should go before value.time:<format> For custom date time formats type for example time:YYYY-MM-DD .si:<base scale><unit characters> for custom SI units. For example: si: mF . This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.count:<unit> for a custom count unit.currency:<unit> for custom a currency unit. | |
writeable | boolean | No | True if data source can write a value to the path. Auth/authz are supported separately |
RangeMap
Maps numerical ranges to a display text and color. For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | options | Yes | Range to match against and the result to apply when the value is within the range | |
type | string | Yes |
RegexMap
Maps regular expressions to replacement text and a color. For example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | options | Yes | Regular expression to match against and the result to apply when the value matches the regex | |
type | string | Yes |
SpecialValueMap
Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color. See SpecialValueMatch to see the list of special values. For example, you can configure a special value mapping so that null values appear as N/A.
Property | Type | Required | Default | Description |
---|---|---|---|---|
options | options | Yes | ||
type | string | Yes |
Target
Schema for panel targets is specified by datasource plugins. We use a placeholder definition, which the Go schema loader either left open/as-is with the Base variant of the Dashboard and Panel families, or filled with types derived from plugins in the Instance variant. When working directly from CUE, importers can extend this type directly to achieve the same effect.
Property | Type | Required | Default | Description |
---|
Options
It depends on the panel plugin. They are specified by the Options field in panel plugin schemas.
Property | Type | Required | Default | Description |
---|
RowPanel
Row panel
Property | Type | Required | Default | Description |
---|---|---|---|---|
collapsed | boolean | Yes | false | Whether this row should be collapsed or not. |
id | uint32 | Yes | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. | |
panels | panels[] | Yes | List of panels in the row | |
type | string | Yes | The panel type Possible values are: row . | |
datasource | DataSourceRef | No | Ref to a DataSource instance | |
gridPos | GridPos | No | Position and dimensions of a panel in the grid | |
repeat | string | No | Name of template variable to repeat for. | |
title | string | No | Row title |
Panels
Property | Type | Required | Default | Description |
---|---|---|---|---|
object | Possible types are: Panel, GraphPanel, HeatmapPanel. |
GraphPanel
Support for legacy graph panel. @deprecated this a deprecated panel type
Property | Type | Required | Default | Description |
---|---|---|---|---|
type | string | Yes | Possible values are: graph . | |
legend | legend | No | @deprecated this is part of deprecated graph panel |
Panel
Dashboard panels are the basic visualization building blocks.
Property | Type | Required | Default | Description |
---|---|---|---|---|
fieldConfig | FieldConfigSource | Yes | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations. | |
options | options | Yes | It depends on the panel plugin. They are specified by the Options field in panel plugin schemas. | |
transformations | DataTransformerConfig[] | Yes | List of transformations that are applied to the panel data before rendering. When there are multiple transformations, Grafana applies them in the order they are listed. Each transformation creates a result set that then passes on to the next transformation in the processing pipeline. | |
transparent | boolean | Yes | false | Whether to display the panel without a background. |
type | string | Yes | The panel plugin type id. This is used to find the plugin to display the panel. Constraint: length >=1 . | |
datasource | DataSourceRef | No | Ref to a DataSource instance | |
description | string | No | Panel description. | |
gridPos | GridPos | No | Position and dimensions of a panel in the grid | |
id | uint32 | No | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. | |
interval | string | No | The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables. This value must be formatted as a number followed by a valid time identifier like: “40s”, “3d”, etc. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
libraryPanel | LibraryPanelRef | No | A library panel is a reusable panel that you can use in any dashboard. When you make a change to a library panel, that change propagates to all instances of where the panel is used. Library panels streamline reuse of panels across multiple dashboards. | |
links | DashboardLink[] | No | Panel links. | |
maxDataPoints | number | No | The maximum number of data points that the panel queries are retrieving. | |
pluginVersion | string | No | The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs. | |
repeatDirection | string | No | h | Direction to repeat in if ‘repeat’ is set.h for horizontal, v for vertical.Possible values are: h , v . |
repeatPanelId | integer | No | Id of the repeating panel. | |
repeat | string | No | Name of template variable to repeat for. | |
tags | string[] | No | Tags for the panel. | |
targets | Target[] | No | Depends on the panel plugin. See the plugin documentation for details. | |
timeFrom | string | No | Overrides the relative time range for individual panels, which causes them to be different than what is selected in the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different time periods or days on the same dashboard. The value is formatted as time operation like: now-5m (Last 5 minutes), now/d (the day so far),now-5d/d (Last 5 days), now/w (This week so far), now-2y/y (Last 2 years).Note: Panel time overrides have no effect when the dashboard’s time range is absolute. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
timeShift | string | No | Overrides the time range for individual panels by shifting its start and end relative to the time picker. For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting 2h .Note: Panel time overrides have no effect when the dashboard’s time range is absolute. See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options | |
title | string | No | Panel title. |
Templating
Configured template variables
Property | Type | Required | Default | Description |
---|---|---|---|---|
list | VariableModel[] | No | List of configured template variables with their saved values along with some other metadata |
VariableModel
A variable is a placeholder for a value. You can use variables in metric queries and in panel titles.
Property | Type | Required | Default | Description |
---|---|---|---|---|
hide | integer | Yes | Determine if the variable shows on dashboard Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing). Possible values are: 0 , 1 , 2 . | |
id | string | Yes | 00000000-0000-0000-0000-000000000000 | Unique numeric identifier for the variable. |
name | string | Yes | Name of variable | |
skipUrlSync | boolean | Yes | false | Whether the variable value should be managed by URL query params or not |
type | string | Yes | Dashboard variable typequery : Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on.adhoc : Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only).constant : Define a hidden constant.datasource : Quickly change the data source for an entire dashboard.interval : Interval variables represent time spans.textbox : Display a free text input field with an optional default value.custom : Define the variable options manually using a comma-separated list.system : Variables defined by Grafana. See: https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variablesPossible values are: query , adhoc , constant , datasource , interval , textbox , custom , system . | |
allFormat | string | No | Format to use while fetching all values from data source, eg: wildcard, glob, regex, pipe, etc. | |
current | VariableOption | No | Option to be selected in a variable. | |
datasource | DataSourceRef | No | Ref to a DataSource instance | |
description | string | No | Description of variable. It can be defined but null . | |
label | string | No | Optional display name | |
multi | boolean | No | false | Whether multiple values can be selected or not from variable value list |
options | VariableOption[] | No | Options that can be selected for a variable. | |
query | No | Query used to fetch values for a variable | ||
refresh | integer | No | Options to config when to refresh a variable0 : Never refresh the variable1 : Queries the data source every time the dashboard loads.2 : Queries the data source when the dashboard time range changes.Possible values are: 0 , 1 , 2 . |
VariableOption
Option to be selected in a variable.
Property | Type | Required | Default | Description |
---|---|---|---|---|
text | Yes | Text to be displayed for the option | ||
value | Yes | Value of the option | ||
selected | boolean | No | Whether the option is selected or not |
Time
Time range for dashboard. Accepted values are relative time strings like {from: ’now-6h’, to: ’now’} or absolute time strings like {from: ‘2020-07-10T08:00:00.000Z’, to: ‘2020-07-10T14:00:00.000Z’}.
Property | Type | Required | Default | Description |
---|---|---|---|---|
from | string | Yes | now-6h | |
to | string | Yes | now |
Timepicker
Configuration of the time picker shown at the top of a dashboard.
Property | Type | Required | Default | Description |
---|---|---|---|---|
collapse | boolean | Yes | false | Whether timepicker is collapsed or not. Has no effect on provisioned dashboard. |
enable | boolean | Yes | true | Whether timepicker is enabled or not. Has no effect on provisioned dashboard. |
hidden | boolean | Yes | false | Whether timepicker is visible or not. |
refresh_intervals | string[] | Yes | [5s 10s 30s 1m 5m 15m 30m 1h 2h 1d] | Interval options available in the refresh picker dropdown. |
time_options | string[] | Yes | [5m 15m 1h 6h 12h 24h 2d 7d 30d] | Selectable options available in the time picker dropdown. Has no effect on provisioned dashboard. |
Status
Property | Type | Required | Default | Description |
---|---|---|---|---|
additionalFields | object | No | additionalFields is reserved for future use | |
operatorStates | map[string]status.#OperatorState | No | operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
AdditionalFields
additionalFields is reserved for future use
Property | Type | Required | Default | Description |
---|
Status.#OperatorState
Property | Type | Required | Default | Description |
---|---|---|---|---|
lastEvaluation | string | Yes | lastEvaluation is the ResourceVersion last evaluated | |
state | string | Yes | state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation. Possible values are: success , in_progress , failed . | |
descriptiveState | string | No | descriptiveState is an optional more descriptive state field which has no requirements on format | |
details | object | No | details contains any extra information that is operator-specific |
Details
details contains any extra information that is operator-specific
Property | Type | Required | Default | Description |
---|
Was this page helpful?
Related resources from Grafana Labs


