elasticsearch

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Lucene = "lucene"
	PPL    = "PPL"
)

Query Types

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketAgg

type BucketAgg struct {
	Field    string           `json:"field"`
	ID       string           `json:"id"`
	Settings *simplejson.Json `json:"settings"`
	Type     string           `jsons:"type"`
}

BucketAgg represents a bucket aggregation of the time series query model of the datasource

type ElasticsearchDatasource

type ElasticsearchDatasource struct {
	// contains filtered or unexported fields
}

func NewElasticsearchDatasource

func NewElasticsearchDatasource() *ElasticsearchDatasource

func (*ElasticsearchDatasource) CheckHealth

CheckHealth handles health checks sent from Grafana to the plugin. The main use case for these health checks is the test button on the datasource configuration page which allows users to verify that a datasource is working as expected.

func (*ElasticsearchDatasource) QueryData

QueryData handles multiple queries and returns multiple responses. req contains the queries []DataQuery (where each query contains RefID as a unique identifer). The QueryDataResponse contains a map of RefID to the response for each query, and each response contains Frames ([]*Frame).

type ElasticsearchDatasourceInstance

type ElasticsearchDatasourceInstance struct {
	// contains filtered or unexported fields
}

type ElasticsearchExecutor

type ElasticsearchExecutor struct{}

ElasticsearchExecutor represents a handler for handling elasticsearch datasource request

type MetricAgg

type MetricAgg struct {
	Field             string            `json:"field"`
	Hide              bool              `json:"hide"`
	ID                string            `json:"id"`
	PipelineAggregate string            `json:"pipelineAgg"`
	PipelineVariables map[string]string `json:"pipelineVariables"`
	Settings          *simplejson.Json  `json:"settings"`
	Meta              *simplejson.Json  `json:"meta"`
	Type              string            `json:"type"`
}

MetricAgg represents a metric aggregation of the time series query model of the datasource

type Query

type Query struct {
	TimeField  string       `json:"timeField"`
	RawQuery   string       `json:"query"`
	QueryType  string       `json:"queryType"`
	BucketAggs []*BucketAgg `json:"bucketAggs"`
	Metrics    []*MetricAgg `json:"metrics"`
	Alias      string       `json:"alias"`
	Interval   string
	RefID      string
}

Query represents the time series query model of the datasource

type TsdbQueryEndpoint

type TsdbQueryEndpoint interface {
	Query(ctx context.Context, ds *backend.DataSourceInstanceSettings, query *tsdb.TsdbQuery) (*tsdb.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL