storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommonMetricName  = "ropee_metric_name"
	CommonMetricValue = "ropee_metric_value"
)

Variables

This section is empty.

Functions

func MakeSPL

func MakeSPL(query *prompb.Query, c RemoteClient, index string) (string, error)

Types

type Client

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

func (*Client) GetMetrics

func (c *Client) GetMetrics() []string

func (*Client) LabelValues

func (c *Client) LabelValues(labelName string) []string

func (*Client) MetricLabels

func (c *Client) MetricLabels(metricName string) []string

func (*Client) Read

func (c *Client) Read(req *prompb.ReadRequest) (*prompb.ReadResponse, error)

func (*Client) Write

func (c *Client) Write(req *prompb.WriteRequest) error

type LabelValue

type LabelValue struct {
	Name string `json:"name"`
}

type Metric

type Metric struct {
	Name string `json:"name"`
}

type MetricLabel

type MetricLabel struct {
	Name string `json:"name"`
}

type RemoteClient

type RemoteClient interface {
	Read(*prompb.ReadRequest) (*prompb.ReadResponse, error)
	Write(*prompb.WriteRequest) error
	MetricLabels(string) []string
	LabelValues(string) []string
}

func NewClient

func NewClient(
	url, user, password,
	index, sourcetype string,
	hecUrl, hecToken string,
	timeout time.Duration, log log.Logger) (RemoteClient, error)

type SplunkMetricEvent

type SplunkMetricEvent struct {
	Time      int64
	MetricStr string
}

func TimeSeriesToPromMetrics

func TimeSeriesToPromMetrics(series prompb.TimeSeries) []SplunkMetricEvent

Jump to

Keyboard shortcuts

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