elasticsearch

package
v0.0.0-...-e58a317 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client allows sending batches of Prometheus samples to ElasticSearch.

func NewClient

func NewClient(url string, maxRetries int, esIndexPerfix, esType string, timeout time.Duration, awsService bool) *Client

NewClient returns a Client which contains an elasticsearch client. Now, it generates the real esIndex formatted with `<esIndexPerfix>-YYYY-mm-dd`.

func (*Client) Collect

func (c *Client) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Client) Describe

func (c *Client) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (Client) Name

func (c Client) Name() string

Name identifies the client as an elasticsearch client.

func (*Client) Read

func (c *Client) Read(req *remote.ReadRequest) ([]map[string]interface{}, error)

Read queries metrics from Elasticsearch.

func (*Client) Write

func (c *Client) Write(samples model.Samples) error

Write sends a batch of samples to Elasticsearch.

Jump to

Keyboard shortcuts

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