Menu
Grafana Cloud Enterprise Open source

Both documentation generation and kinds schemas are in active development and subject to change without prior notice.

ElasticsearchDataQuery

Maturity: experimental

Version: 0.0

PropertyTypeRequiredDefaultDescription
refIdstringYesA unique identifier for the query within the list of targets.
In server side expressions, the refId is used as a variable name to identify results.
By default, the UI will assign A->Z; however setting meaningful names may be useful.
aliasstringNoAlias pattern
bucketAggsBucketAggregation[]NoList of bucket aggregations
datasourceNoFor mixed data sources the selected datasource is on the query level.
For non mixed scenarios this is undefined.
TODO find a better way to do this ^ that’s friendly to schema
TODO this shouldn’t be unknown but DataSourceRef | null
hidebooleanNotrue if query is disabled (ie should not be returned to the dashboard)
Note this does not always imply that the query should not be executed since
the results from a hidden query may be used as the input to other queries (SSE etc)
metricsMetricAggregation[]NoList of metric aggregations
queryTypestringNoSpecify the query flavor
TODO make this required and give it a default
querystringNoLucene query
timeFieldstringNoName of time field

BucketAggregation

PropertyTypeRequiredDefaultDescription
objectPossible types are: DateHistogram, Histogram, Terms, Filters, GeoHashGrid, Nested.

DateHistogram

It extends BucketAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BucketAggregationWithField)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo(Inherited from BucketAggregationWithField)
idstringNo(Inherited from BucketAggregationWithField)
settingsNo(Inherited from BucketAggregationWithField)

BucketAggregationWithField

It extends BaseBucketAggregation.

PropertyTypeRequiredDefaultDescription
idstringYes(Inherited from BaseBucketAggregation)
typestringYes(Inherited from BaseBucketAggregation)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo
settingsNo(Inherited from BaseBucketAggregation)

BaseBucketAggregation

PropertyTypeRequiredDefaultDescription
idstringYes
typestringYesPossible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
settingsNo

Filters

It extends BaseBucketAggregation.

PropertyTypeRequiredDefaultDescription
idstringYes(Inherited from BaseBucketAggregation)
typestringYes(Inherited from BaseBucketAggregation)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
settingsNo(Inherited from BaseBucketAggregation)

GeoHashGrid

It extends BucketAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BucketAggregationWithField)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo(Inherited from BucketAggregationWithField)
idstringNo(Inherited from BucketAggregationWithField)
settingsNo(Inherited from BucketAggregationWithField)

Histogram

It extends BucketAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BucketAggregationWithField)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo(Inherited from BucketAggregationWithField)
idstringNo(Inherited from BucketAggregationWithField)
settingsNo(Inherited from BucketAggregationWithField)

Nested

It extends BucketAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BucketAggregationWithField)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo(Inherited from BucketAggregationWithField)
idstringNo(Inherited from BucketAggregationWithField)
settingsNo(Inherited from BucketAggregationWithField)

Terms

It extends BucketAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BucketAggregationWithField)
Possible values are: terms, filters, geohash_grid, date_histogram, histogram, nested.
fieldstringNo(Inherited from BucketAggregationWithField)
idstringNo(Inherited from BucketAggregationWithField)
settingsNo(Inherited from BucketAggregationWithField)

MetricAggregation

PropertyTypeRequiredDefaultDescription
objectPossible types are: Count, PipelineMetricAggregation, .

Count

It extends BaseMetricAggregation.

PropertyTypeRequiredDefaultDescription
idstringYes(Inherited from BaseMetricAggregation)
typestringYes(Inherited from BaseMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
hidebooleanNo(Inherited from BaseMetricAggregation)

BaseMetricAggregation

PropertyTypeRequiredDefaultDescription
idstringYes
typestringYesPossible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
hidebooleanNo

PipelineMetricAggregation

PropertyTypeRequiredDefaultDescription
objectPossible types are: MovingAverage, Derivative, CumulativeSum, BucketScript.

BucketScript

It extends PipelineMetricAggregationWithMultipleBucketPaths.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from PipelineMetricAggregationWithMultipleBucketPaths)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
hidebooleanNo(Inherited from PipelineMetricAggregationWithMultipleBucketPaths)
idstringNo(Inherited from PipelineMetricAggregationWithMultipleBucketPaths)
pipelineVariablesPipelineVariable[]No(Inherited from PipelineMetricAggregationWithMultipleBucketPaths)
settingsobjectNo

PipelineMetricAggregationWithMultipleBucketPaths

It extends BaseMetricAggregation.

PropertyTypeRequiredDefaultDescription
idstringYes(Inherited from BaseMetricAggregation)
typestringYes(Inherited from BaseMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
hidebooleanNo(Inherited from BaseMetricAggregation)
pipelineVariablesPipelineVariable[]No

PipelineVariable

PropertyTypeRequiredDefaultDescription
namestringYes
pipelineAggstringYes

Settings

PropertyTypeRequiredDefaultDescription
scriptNo

CumulativeSum

It extends BasePipelineMetricAggregation.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BasePipelineMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
fieldstringNo(Inherited from BasePipelineMetricAggregation)
hidebooleanNo(Inherited from BasePipelineMetricAggregation)
idstringNo(Inherited from BasePipelineMetricAggregation)
pipelineAggstringNo(Inherited from BasePipelineMetricAggregation)
settingsobjectNo

BasePipelineMetricAggregation

It extends MetricAggregationWithField.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from MetricAggregationWithField)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
fieldstringNo(Inherited from MetricAggregationWithField)
hidebooleanNo(Inherited from MetricAggregationWithField)
idstringNo(Inherited from MetricAggregationWithField)
pipelineAggstringNo

MetricAggregationWithField

It extends BaseMetricAggregation.

PropertyTypeRequiredDefaultDescription
idstringYes(Inherited from BaseMetricAggregation)
typestringYes(Inherited from BaseMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
fieldstringNo
hidebooleanNo(Inherited from BaseMetricAggregation)

Settings

PropertyTypeRequiredDefaultDescription
formatstringNo

Derivative

It extends BasePipelineMetricAggregation.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BasePipelineMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
fieldstringNo(Inherited from BasePipelineMetricAggregation)
hidebooleanNo(Inherited from BasePipelineMetricAggregation)
idstringNo(Inherited from BasePipelineMetricAggregation)
pipelineAggstringNo(Inherited from BasePipelineMetricAggregation)
settingsobjectNo

Settings

PropertyTypeRequiredDefaultDescription
unitstringNo

MovingAverage

#MovingAverage’s settings are overridden in types.ts

It extends BasePipelineMetricAggregation.

PropertyTypeRequiredDefaultDescription
typestringYes(Inherited from BasePipelineMetricAggregation)
Possible values are: count, avg, sum, min, max, extended_stats, percentiles, cardinality, raw_document, raw_data, logs, rate, top_metrics, moving_avg, moving_fn, derivative, serial_diff, cumulative_sum, bucket_script.
fieldstringNo(Inherited from BasePipelineMetricAggregation)
hidebooleanNo(Inherited from BasePipelineMetricAggregation)
idstringNo(Inherited from BasePipelineMetricAggregation)
pipelineAggstringNo(Inherited from BasePipelineMetricAggregation)
settingsobjectNo

Settings

PropertyTypeRequiredDefaultDescription

Meta

PropertyTypeRequiredDefaultDescription

Settings

PropertyTypeRequiredDefaultDescription
metricsstring[]No
orderBystringNo
orderstringNo