Documentation ¶
Index ¶
- type Average
- type BaseBucketAggregation
- type BaseMetricAggregation
- type BaseMovingAverageModelSettings
- type BasePipelineMetricAggregation
- type BucketAggregationType
- type BucketAggregationWithField
- type BucketScript
- type Count
- type CumulativeSum
- type DataQuery
- type DateHistogram
- type DateHistogramSettings
- type Derivative
- type ElasticsearchDataQuery
- type ExtendedStat
- type ExtendedStatMetaType
- type ExtendedStats
- type Filter
- type Filters
- type FiltersSettings
- type GeoHashGrid
- type GeoHashGridSettings
- type Histogram
- type HistogramSettings
- type Logs
- type Max
- type MetricAggregationType
- type MetricAggregationWithField
- type MetricAggregationWithInlineScript
- type MetricAggregationWithMissingSupport
- type Min
- type MovingAverage
- type MovingAverageEWMAModelSettings
- type MovingAverageHoltModelSettings
- type MovingAverageHoltWintersModelSettings
- type MovingAverageLinearModelSettings
- type MovingAverageModel
- type MovingAverageModelOption
- type MovingAverageSimpleModelSettings
- type MovingFunction
- type Nested
- type Percentiles
- type PipelineMetricAggregationType
- type PipelineMetricAggregationWithMultipleBucketPaths
- type PipelineVariable
- type Rate
- type RawData
- type RawDocument
- type SerialDiff
- type Sum
- type Terms
- type TermsOrder
- type TermsSettings
- type TopMetrics
- type UniqueCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Average ¶
type Average struct { MetricAggregationWithField MetricAggregationWithInlineScript MetricAggregationWithMissingSupport Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Average defines model for Average.
type BaseBucketAggregation ¶
type BaseBucketAggregation struct { Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
BaseBucketAggregation defines model for BaseBucketAggregation.
type BaseMetricAggregation ¶
type BaseMetricAggregation struct { Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Type MetricAggregationType `json:"type"` }
BaseMetricAggregation defines model for BaseMetricAggregation.
type BaseMovingAverageModelSettings ¶
type BaseMovingAverageModelSettings struct { Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Window string `json:"window"` }
BaseMovingAverageModelSettings defines model for BaseMovingAverageModelSettings.
type BasePipelineMetricAggregation ¶
type BasePipelineMetricAggregation struct { MetricAggregationWithField Hide *bool `json:"hide,omitempty"` Id string `json:"id"` PipelineAgg *string `json:"pipelineAgg,omitempty"` Type MetricAggregationType `json:"type"` }
BasePipelineMetricAggregation defines model for BasePipelineMetricAggregation.
type BucketAggregationType ¶
type BucketAggregationType string
BucketAggregationType defines model for BucketAggregationType.
const ( BucketAggregationTypeDateHistogram BucketAggregationType = "date_histogram" BucketAggregationTypeFilters BucketAggregationType = "filters" BucketAggregationTypeGeohashGrid BucketAggregationType = "geohash_grid" BucketAggregationTypeHistogram BucketAggregationType = "histogram" BucketAggregationTypeNested BucketAggregationType = "nested" BucketAggregationTypeTerms BucketAggregationType = "terms" )
Defines values for BucketAggregationType.
type BucketAggregationWithField ¶
type BucketAggregationWithField struct { BaseBucketAggregation Field *string `json:"field,omitempty"` }
BucketAggregationWithField defines model for BucketAggregationWithField.
type BucketScript ¶
type BucketScript struct { PipelineMetricAggregationWithMultipleBucketPaths Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
BucketScript defines model for BucketScript.
type Count ¶
type Count struct { BaseMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Type MetricAggregationType `json:"type"` }
Count defines model for Count.
type CumulativeSum ¶
type CumulativeSum struct { BasePipelineMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Format *string `json:"format,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
CumulativeSum defines model for CumulativeSum.
type DataQuery ¶
type DataQuery struct { // For 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 Datasource *any `json:"datasource,omitempty"` // Hide true 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) Hide *bool `json:"hide,omitempty"` // Specify the query flavor // TODO make this required and give it a default QueryType *string `json:"queryType,omitempty"` // A 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. RefId string `json:"refId"` }
These are the common properties available to all queries in all datasources. Specific implementations will *extend* this interface, adding the required properties for the given context.
type DateHistogram ¶
type DateHistogram struct { BucketAggregationWithField Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
DateHistogram defines model for DateHistogram.
type DateHistogramSettings ¶
type DateHistogramSettings struct { Interval *string `json:"interval,omitempty"` MinDocCount *string `json:"min_doc_count,omitempty"` Offset *string `json:"offset,omitempty"` TimeZone *string `json:"timeZone,omitempty"` TrimEdges *string `json:"trimEdges,omitempty"` }
DateHistogramSettings defines model for DateHistogramSettings.
type Derivative ¶
type Derivative struct { BasePipelineMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Unit *string `json:"unit,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Derivative defines model for Derivative.
type ElasticsearchDataQuery ¶
type ElasticsearchDataQuery struct { // DataQuery These are the common properties available to all queries in all datasources. // Specific implementations will *extend* this interface, adding the required // properties for the given context. DataQuery // Alias pattern Alias *string `json:"alias,omitempty"` // List of bucket aggregations BucketAggs []any `json:"bucketAggs,omitempty"` // List of metric aggregations Metrics []any `json:"metrics,omitempty"` // Lucene query Query *string `json:"query,omitempty"` // Name of time field TimeField *string `json:"timeField,omitempty"` }
ElasticsearchDataQuery defines model for ElasticsearchDataQuery.
type ExtendedStat ¶
type ExtendedStat struct { Label string `json:"label"` Value ExtendedStatMetaType `json:"value"` }
ExtendedStat defines model for ExtendedStat.
type ExtendedStatMetaType ¶
type ExtendedStatMetaType string
ExtendedStatMetaType defines model for ExtendedStatMetaType.
const ( ExtendedStatMetaTypeAvg ExtendedStatMetaType = "avg" ExtendedStatMetaTypeCount ExtendedStatMetaType = "count" ExtendedStatMetaTypeMax ExtendedStatMetaType = "max" ExtendedStatMetaTypeMin ExtendedStatMetaType = "min" ExtendedStatMetaTypeStdDeviation ExtendedStatMetaType = "std_deviation" ExtendedStatMetaTypeStdDeviationBoundsLower ExtendedStatMetaType = "std_deviation_bounds_lower" ExtendedStatMetaTypeStdDeviationBoundsUpper ExtendedStatMetaType = "std_deviation_bounds_upper" ExtendedStatMetaTypeSum ExtendedStatMetaType = "sum" )
Defines values for ExtendedStatMetaType.
type ExtendedStats ¶
type ExtendedStats struct { MetricAggregationWithField MetricAggregationWithInlineScript Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Meta map[string]any `json:"meta,omitempty"` Settings *struct { Missing *string `json:"missing,omitempty"` Script *any `json:"script,omitempty"` Sigma *string `json:"sigma,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
ExtendedStats defines model for ExtendedStats.
type Filters ¶
type Filters struct { BaseBucketAggregation Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
Filters defines model for Filters.
type FiltersSettings ¶
type FiltersSettings struct {
Filters []Filter `json:"filters,omitempty"`
}
FiltersSettings defines model for FiltersSettings.
type GeoHashGrid ¶
type GeoHashGrid struct { BucketAggregationWithField Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
GeoHashGrid defines model for GeoHashGrid.
type GeoHashGridSettings ¶
type GeoHashGridSettings struct {
Precision *string `json:"precision,omitempty"`
}
GeoHashGridSettings defines model for GeoHashGridSettings.
type Histogram ¶
type Histogram struct { BucketAggregationWithField Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
Histogram defines model for Histogram.
type HistogramSettings ¶
type HistogramSettings struct { Interval *string `json:"interval,omitempty"` MinDocCount *string `json:"min_doc_count,omitempty"` }
HistogramSettings defines model for HistogramSettings.
type Logs ¶
type Logs struct { BaseMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Limit *string `json:"limit,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Logs defines model for Logs.
type Max ¶
type Max struct { MetricAggregationWithField MetricAggregationWithInlineScript Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Max defines model for Max.
type MetricAggregationType ¶
type MetricAggregationType string
MetricAggregationType defines model for MetricAggregationType.
const ( MetricAggregationTypeAvg MetricAggregationType = "avg" MetricAggregationTypeBucketScript MetricAggregationType = "bucket_script" MetricAggregationTypeCardinality MetricAggregationType = "cardinality" MetricAggregationTypeCount MetricAggregationType = "count" MetricAggregationTypeCumulativeSum MetricAggregationType = "cumulative_sum" MetricAggregationTypeDerivative MetricAggregationType = "derivative" MetricAggregationTypeExtendedStats MetricAggregationType = "extended_stats" MetricAggregationTypeLogs MetricAggregationType = "logs" MetricAggregationTypeMax MetricAggregationType = "max" MetricAggregationTypeMin MetricAggregationType = "min" MetricAggregationTypeMovingAvg MetricAggregationType = "moving_avg" MetricAggregationTypeMovingFn MetricAggregationType = "moving_fn" MetricAggregationTypePercentiles MetricAggregationType = "percentiles" MetricAggregationTypeRate MetricAggregationType = "rate" MetricAggregationTypeRawData MetricAggregationType = "raw_data" MetricAggregationTypeRawDocument MetricAggregationType = "raw_document" MetricAggregationTypeSerialDiff MetricAggregationType = "serial_diff" MetricAggregationTypeSum MetricAggregationType = "sum" MetricAggregationTypeTopMetrics MetricAggregationType = "top_metrics" )
Defines values for MetricAggregationType.
type MetricAggregationWithField ¶
type MetricAggregationWithField struct { BaseMetricAggregation Field *string `json:"field,omitempty"` }
MetricAggregationWithField defines model for MetricAggregationWithField.
type MetricAggregationWithInlineScript ¶
type MetricAggregationWithInlineScript struct { BaseMetricAggregation Settings *struct { Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` }
MetricAggregationWithInlineScript defines model for MetricAggregationWithInlineScript.
type MetricAggregationWithMissingSupport ¶
type MetricAggregationWithMissingSupport struct { BaseMetricAggregation Settings *struct { Missing *string `json:"missing,omitempty"` } `json:"settings,omitempty"` }
MetricAggregationWithMissingSupport defines model for MetricAggregationWithMissingSupport.
type Min ¶
type Min struct { MetricAggregationWithField MetricAggregationWithInlineScript Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Min defines model for Min.
type MovingAverage ¶
type MovingAverage struct { BasePipelineMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings map[string]any `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
MovingAverage defines model for MovingAverage.
type MovingAverageEWMAModelSettings ¶
type MovingAverageEWMAModelSettings struct { BaseMovingAverageModelSettings Minimize bool `json:"minimize"` Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Settings *struct { Alpha *string `json:"alpha,omitempty"` } `json:"settings,omitempty"` Window string `json:"window"` }
MovingAverageEWMAModelSettings defines model for MovingAverageEWMAModelSettings.
type MovingAverageHoltModelSettings ¶
type MovingAverageHoltModelSettings struct { BaseMovingAverageModelSettings Minimize bool `json:"minimize"` Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Settings struct { Alpha *string `json:"alpha,omitempty"` Beta *string `json:"beta,omitempty"` } `json:"settings"` Window string `json:"window"` }
MovingAverageHoltModelSettings defines model for MovingAverageHoltModelSettings.
type MovingAverageHoltWintersModelSettings ¶
type MovingAverageHoltWintersModelSettings struct { BaseMovingAverageModelSettings Minimize bool `json:"minimize"` Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Settings struct { Alpha *string `json:"alpha,omitempty"` Beta *string `json:"beta,omitempty"` Gamma *string `json:"gamma,omitempty"` Pad *bool `json:"pad,omitempty"` Period *string `json:"period,omitempty"` } `json:"settings"` Window string `json:"window"` }
MovingAverageHoltWintersModelSettings defines model for MovingAverageHoltWintersModelSettings.
type MovingAverageLinearModelSettings ¶
type MovingAverageLinearModelSettings struct { BaseMovingAverageModelSettings Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Window string `json:"window"` }
MovingAverageLinearModelSettings defines model for MovingAverageLinearModelSettings.
type MovingAverageModel ¶
type MovingAverageModel string
MovingAverageModel defines model for MovingAverageModel.
const ( MovingAverageModelEwma MovingAverageModel = "ewma" MovingAverageModelHolt MovingAverageModel = "holt" MovingAverageModelHoltWinters MovingAverageModel = "holt_winters" MovingAverageModelLinear MovingAverageModel = "linear" MovingAverageModelSimple MovingAverageModel = "simple" )
Defines values for MovingAverageModel.
type MovingAverageModelOption ¶
type MovingAverageModelOption struct { Label string `json:"label"` Value MovingAverageModel `json:"value"` }
MovingAverageModelOption defines model for MovingAverageModelOption.
type MovingAverageSimpleModelSettings ¶
type MovingAverageSimpleModelSettings struct { BaseMovingAverageModelSettings Model MovingAverageModel `json:"model"` Predict string `json:"predict"` Window string `json:"window"` }
MovingAverageSimpleModelSettings defines model for MovingAverageSimpleModelSettings.
type MovingFunction ¶
type MovingFunction struct { BasePipelineMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Script *any `json:"script,omitempty"` Shift *string `json:"shift,omitempty"` Window *string `json:"window,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
MovingFunction defines model for MovingFunction.
type Nested ¶
type Nested struct { BucketAggregationWithField Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
Nested defines model for Nested.
type Percentiles ¶
type Percentiles struct { MetricAggregationWithField MetricAggregationWithInlineScript Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` Percents []string `json:"percents,omitempty"` Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Percentiles defines model for Percentiles.
type PipelineMetricAggregationType ¶
type PipelineMetricAggregationType string
PipelineMetricAggregationType defines model for PipelineMetricAggregationType.
const ( PipelineMetricAggregationTypeBucketScript PipelineMetricAggregationType = "bucket_script" PipelineMetricAggregationTypeCumulativeSum PipelineMetricAggregationType = "cumulative_sum" PipelineMetricAggregationTypeDerivative PipelineMetricAggregationType = "derivative" PipelineMetricAggregationTypeMovingAvg PipelineMetricAggregationType = "moving_avg" PipelineMetricAggregationTypeMovingFn PipelineMetricAggregationType = "moving_fn" PipelineMetricAggregationTypeSerialDiff PipelineMetricAggregationType = "serial_diff" )
Defines values for PipelineMetricAggregationType.
type PipelineMetricAggregationWithMultipleBucketPaths ¶
type PipelineMetricAggregationWithMultipleBucketPaths struct { BaseMetricAggregation PipelineVariables []PipelineVariable `json:"pipelineVariables,omitempty"` }
PipelineMetricAggregationWithMultipleBucketPaths defines model for PipelineMetricAggregationWithMultipleBucketPaths.
type PipelineVariable ¶
PipelineVariable defines model for PipelineVariable.
type Rate ¶
type Rate struct { MetricAggregationWithField Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Mode *string `json:"mode,omitempty"` Unit *string `json:"unit,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Rate defines model for Rate.
type RawData ¶
type RawData struct { BaseMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Size *string `json:"size,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
RawData defines model for RawData.
type RawDocument ¶
type RawDocument struct { BaseMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Size *string `json:"size,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
RawDocument defines model for RawDocument.
type SerialDiff ¶
type SerialDiff struct { BasePipelineMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Lag *string `json:"lag,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
SerialDiff defines model for SerialDiff.
type Sum ¶
type Sum struct { MetricAggregationWithField MetricAggregationWithInlineScript Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` Script *any `json:"script,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
Sum defines model for Sum.
type Terms ¶
type Terms struct { BucketAggregationWithField Id string `json:"id"` Settings *any `json:"settings,omitempty"` Type BucketAggregationType `json:"type"` }
Terms defines model for Terms.
type TermsOrder ¶
type TermsOrder string
TermsOrder defines model for TermsOrder.
const ( TermsOrderAsc TermsOrder = "asc" TermsOrderDesc TermsOrder = "desc" )
Defines values for TermsOrder.
type TermsSettings ¶
type TermsSettings struct { MinDocCount *string `json:"min_doc_count,omitempty"` Missing *string `json:"missing,omitempty"` Order *TermsOrder `json:"order,omitempty"` OrderBy *string `json:"orderBy,omitempty"` Size *string `json:"size,omitempty"` }
TermsSettings defines model for TermsSettings.
type TopMetrics ¶
type TopMetrics struct { BaseMetricAggregation Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Metrics []string `json:"metrics,omitempty"` Order *string `json:"order,omitempty"` OrderBy *string `json:"orderBy,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
TopMetrics defines model for TopMetrics.
type UniqueCount ¶
type UniqueCount struct { MetricAggregationWithField Hide *bool `json:"hide,omitempty"` Id string `json:"id"` Settings *struct { Missing *string `json:"missing,omitempty"` PrecisionThreshold *string `json:"precision_threshold,omitempty"` } `json:"settings,omitempty"` Type MetricAggregationType `json:"type"` }
UniqueCount defines model for UniqueCount.