Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureIndexTemplate ¶
Types ¶
type IndexConfig ¶
IndexConfig is used to configure IndexService
type IndexService ¶
type IndexService struct {
// contains filtered or unexported fields
}
IndexService will manage alias and indexes derived from the configured index alias
func NewIndexService ¶
func NewIndexService(ctx context.Context, logger *zap.Logger, client *elastic.Client, config *IndexConfig) (*IndexService, error)
NewIndexService will ensure required alias and indexes exist. It will also monitor active index and rollover as necessary
type IndexTemplateConfig ¶
IndexTemplateConfig is used to resolve template
type ReadConfig ¶
ReadConfig configures the ReadService
type ReadService ¶
type ReadService struct {
// contains filtered or unexported fields
}
ReadService will proxy Prometheus queries to Elasticsearch
func NewReadService ¶
func NewReadService(logger *zap.Logger, client *elastic.Client, config *ReadConfig) *ReadService
NewReadService will create a new ReadService
func (*ReadService) Read ¶
func (svc *ReadService) Read(ctx context.Context, req []*prompb.Query) ([]*prompb.QueryResult, error)
Read will perform Elasticsearch query
type WriteConfig ¶
type WriteConfig struct { Alias string Daily bool MaxAge int MaxDocs int MaxSize int Workers int Stats bool }
WriteConfig is used to configure WriteService
type WriteService ¶
type WriteService struct {
// contains filtered or unexported fields
}
WriteService will proxy Prometheus write requests to Elasticsearch
func NewWriteService ¶
func NewWriteService(ctx context.Context, logger *zap.Logger, client *elastic.Client, config *WriteConfig) (*WriteService, error)
NewWriteService creates and returns a new elasticsearch WriteService
func (*WriteService) Close ¶
func (svc *WriteService) Close() error
Close will close the underlying elasticsearch BulkProcessor
func (*WriteService) Collect ¶
func (svc *WriteService) Collect(ch chan<- prometheus.Metric)
Collect fetches the statistics from the elasticsearch bulk processor, and delivers them as Prometheus metrics. It implements prometheus.Collector.
func (*WriteService) Describe ¶
func (svc *WriteService) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics exported by the memcached exporter. It implements prometheus.Collector.
func (*WriteService) Write ¶
func (svc *WriteService) Write(req []*prompb.TimeSeries)
Write will enqueue Prometheus sample data to be batch written to Elasticsearch