prometheus_output

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricNameRegex = regexp.MustCompile(metricNameRegex)
)

Functions

This section is empty.

Types

type MetricBuilder added in v0.26.0

type MetricBuilder struct {
	Prefix                 string
	AppendSubscriptionName bool
	StringsAsLabels        bool
}

func (*MetricBuilder) GetLabels added in v0.26.0

func (m *MetricBuilder) GetLabels(ev *formatters.EventMsg) []prompb.Label

func (*MetricBuilder) MetricName added in v0.26.0

func (m *MetricBuilder) MetricName(measName, valueName string) string

MetricName generates the prometheus metric name based on the output plugin, the measurement name and the value name. it makes sure the name matches the regex "[^a-zA-Z0-9_]+"

func (*MetricBuilder) TimeSeriesFromEvent added in v0.26.0

func (m *MetricBuilder) TimeSeriesFromEvent(ev *formatters.EventMsg) []*NamedTimeSeries

type NamedTimeSeries added in v0.26.0

type NamedTimeSeries struct {
	Name string
	TS   *prompb.TimeSeries
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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