Documentation ¶
Index ¶
- type AggregateValue
- type Aggregation
- type AggregationRequest
- type AggregationResponse
- type BoolQuery
- type BucketAggregationRequest
- func (b BucketAggregationRequest) AddAggregation(name, aggType, field string) error
- func (b BucketAggregationRequest) AddNestedAggregation(name string, a AggregationRequest)
- func (b BucketAggregationRequest) BucketSize(name string, size int) error
- func (b BucketAggregationRequest) Missing(name, missing string)
- type BucketData
- type MetricAggregation
- type MetricAggregationRequest
- type NestedAggregation
- type OpensearchQuery
- type Query
- type SearchHits
- type TotalHits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateValue ¶
type AggregateValue struct {
// contains filtered or unexported fields
}
func (*AggregateValue) IsAggregation ¶
func (a *AggregateValue) IsAggregation() bool
func (*AggregateValue) UnmarshalJSON ¶
func (a *AggregateValue) UnmarshalJSON(bytes []byte) error
type Aggregation ¶
type Aggregation map[string]AggregateValue
func (*Aggregation) GetMetrics ¶
func (a *Aggregation) GetMetrics(acc telegraf.Accumulator, measurement string, docCount int64, tags map[string]string) error
type AggregationRequest ¶
type AggregationResponse ¶
type AggregationResponse struct { Hits *SearchHits `json:"hits"` Aggregations *Aggregation `json:"aggregations"` }
func (*AggregationResponse) GetMetrics ¶
func (a *AggregationResponse) GetMetrics(acc telegraf.Accumulator, measurement string) error
type BoolQuery ¶
type BoolQuery struct { FilterQueryString string TimestampField string TimeRangeFrom time.Time TimeRangeTo time.Time DateFieldFormat string }
func (*BoolQuery) MarshalJSON ¶
type BucketAggregationRequest ¶
type BucketAggregationRequest map[string]*aggregationFunction
func (BucketAggregationRequest) AddAggregation ¶
func (b BucketAggregationRequest) AddAggregation(name, aggType, field string) error
func (BucketAggregationRequest) AddNestedAggregation ¶
func (b BucketAggregationRequest) AddNestedAggregation(name string, a AggregationRequest)
func (BucketAggregationRequest) BucketSize ¶
func (b BucketAggregationRequest) BucketSize(name string, size int) error
func (BucketAggregationRequest) Missing ¶
func (b BucketAggregationRequest) Missing(name, missing string)
type BucketData ¶
type BucketData struct { DocumentCount int64 `json:"doc_count"` Key string `json:"key"` // contains filtered or unexported fields }
func (*BucketData) UnmarshalJSON ¶
func (b *BucketData) UnmarshalJSON(bytes []byte) error
type MetricAggregation ¶
type MetricAggregation map[string]interface{}
type MetricAggregationRequest ¶
type MetricAggregationRequest map[string]*aggregationFunction
func (MetricAggregationRequest) AddAggregation ¶
func (m MetricAggregationRequest) AddAggregation(name, aggType, field string) error
type NestedAggregation ¶
type NestedAggregation interface { Nested(string, AggregationRequest) Missing(string) Size(int) }
type OpensearchQuery ¶
type OpensearchQuery struct { URLs []string `toml:"urls"` Username config.Secret `toml:"username"` Password config.Secret `toml:"password"` EnableSniffer bool `toml:"enable_sniffer"` Timeout config.Duration `toml:"timeout"` HealthCheckInterval config.Duration `toml:"health_check_interval"` Aggregations []osAggregation `toml:"aggregation"` Log telegraf.Logger `toml:"-"` influxtls.ClientConfig // contains filtered or unexported fields }
OpensearchQuery struct
func (*OpensearchQuery) Gather ¶
func (o *OpensearchQuery) Gather(acc telegraf.Accumulator) error
Gather writes the results of the queries from OpenSearch to the Accumulator.
func (*OpensearchQuery) SampleConfig ¶
func (*OpensearchQuery) SampleConfig() string
type Query ¶
type Query struct { Size int `json:"size"` Aggregations AggregationRequest `json:"aggregations"` Query interface{} `json:"query,omitempty"` }
type SearchHits ¶
type SearchHits struct {
TotalHits *TotalHits `json:"total,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.