Documentation
¶
Index ¶
Constants ¶
View Source
const ( AggFuncCount = "count" AggFuncAvg = "avg" AggFuncSum = "sum" AggFuncMin = "min" AggFuncMax = "max" AggFuncMedium = "medium" AggFuncValueCount = "value_count" AggFuncCardinality = "cardinality" AggFuncDerivative = "derivative" AggFuncRate = "rate" AggFuncPercent99 = "p99" AggFuncPercent95 = "p95" AggFuncPercent90 = "p90" AggFuncPercent80 = "p80" AggFuncPercent50 = "p50" AggFuncLatest = "latest" AggFuncLatency = "latency" AggFuncSumFuncValueInGroup = "sum_func_value_in_group" AggFuncRateSumFuncValueInGroup = "rate_sum_func_value_in_group" AggFuncLatencySumFuncValueInGroup = "latency_sum_func_value_in_group" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketLabel ¶
type Dashboard ¶
type Dashboard struct { ID string `json:"id,omitempty" elastic_meta:"_id" elastic_mapping:"id: { type: keyword }"` Created time.Time `json:"created,omitempty" elastic_mapping:"created: { type: date }"` Updated time.Time `json:"updated,omitempty" elastic_mapping:"updated: { type: date }"` ClusterId string `json:"cluster_id" elastic_mapping:"cluster_id: { type: keyword }"` IndexPattern string `json:"index_pattern" elastic_mapping:"index_pattern: { type: keyword }"` TimeField string `json:"time_field,omitempty" elastic_mapping:"time_field: { type: keyword }"` Filter interface{} `json:"filter,omitempty" elastic_mapping:"filter: { type: object, enabled:false }"` BucketSize string `json:"bucket_size" elastic_mapping:"bucket_size: { type: keyword }"` Title string `json:"title" elastic_mapping:"title: { type: keyword }"` Description string `json:"description" elastic_mapping:"description: { type: keyword }"` Visualizations interface{} `json:"visualizations" elastic_mapping:"visualizations: { type: object, enabled:false }"` Tags []string `json:"tags,omitempty" elastic_mapping:"tags: { type: keyword }"` User string `json:"user" elastic_mapping:"user: { type: keyword }"` Query interface{} `json:"query,omitempty" elastic_mapping:"query: { type: object, enabled:false }"` TimeFilter interface{} `json:"time_filter,omitempty" elastic_mapping:"time_filter: { type: object, enabled:false }"` }
type Metric ¶
type Metric struct { AggTypes []string `json:"agg_types,omitempty"` IndexPattern string `json:"index_pattern,omitempty"` TimeField string `json:"time_field,omitempty"` BucketSize string `json:"bucket_size,omitempty"` Filter interface{} `json:"filter,omitempty"` Groups []MetricGroupItem `json:"groups,omitempty"` //bucket group Sort []GroupSort `json:"sort,omitempty"` ClusterId string `json:"cluster_id,omitempty"` Formula string `json:"formula,omitempty"` //array of formula for new version Formulas []string `json:"formulas,omitempty"` Items []MetricItem `json:"items"` FormatType string `json:"format,omitempty"` TimeFilter interface{} `json:"time_filter,omitempty"` TimeBeforeGroup bool `json:"time_before_group,omitempty"` BucketLabel *BucketLabel `json:"bucket_label,omitempty"` // number of buckets to return, used for aggregation auto_date_histogram when bucket size equals 'auto' Buckets uint `json:"buckets,omitempty"` Unit string `json:"unit,omitempty"` }
func (*Metric) AutoTimeBeforeGroup ¶
AutoTimeBeforeGroup determines if date aggregation should be applied before terms aggregation. Returns false if the metric uses any of the specified aggregation functions.
func (*Metric) GenerateExpression ¶
func (*Metric) UseBucketSort ¶ added in v1.28.2
UseBucketSort determines whether bucket sorting should be used for aggregation. Returns false if the metric contains specific aggregation functions that require alternative handling.
func (*Metric) ValidateSortKey ¶
type MetricData ¶
type MetricData struct { Groups []string `json:"groups,omitempty"` Data map[string][]MetricDataItem GroupLabel string `json:"group_label,omitempty"` }
type MetricDataItem ¶
type MetricGroupItem ¶
type MetricItem ¶
type MetricItem struct { Name string `json:"name,omitempty"` Field string `json:"field"` FieldType string `json:"field_type,omitempty"` Statistic string `json:"statistic,omitempty"` //Function specifies the calculation details for the metric, //including the aggregation type and any associated parameters. Function map[string]interface{} `json:"function,omitempty"` }
type SeriesItem ¶
type Visualization ¶
type Visualization struct { ID string `json:"id,omitempty" elastic_meta:"_id" elastic_mapping:"id: { type: keyword }"` Created *time.Time `json:"created,omitempty" elastic_mapping:"created: { type: date }"` Updated *time.Time `json:"updated,omitempty" elastic_mapping:"updated: { type: date }"` Title string `json:"title,omitempty" elastic_mapping:"title: { type: keyword }"` IndexPattern string `json:"index_pattern,omitempty" elastic_mapping:"index_pattern: { type: keyword }"` ClusterId string `json:"cluster_id,omitempty" elastic_mapping:"cluster_id: { type: keyword }"` Series []SeriesItem `json:"series" elastic_mapping:"series: { type: object,enabled:false }"` Position *Position `json:"position,omitempty" elastic_mapping:"position: { type: object,enabled:false }"` Description string `json:"description,omitempty" elastic_mapping:"description: { type: keyword }"` }
type Widget ¶
type Widget struct { orm.ORMObjectBase Title string `json:"title" elastic_mapping:"title: { type: text }"` Config interface{} `json:"config" elastic_mapping:"config: { type: object,enabled:false }"` }
Click to show internal directories.
Click to hide internal directories.