transformers

package
v5.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT, MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMetricExtraction = errors.New("unable to extract metric from check output")

ErrMetricExtraction is a blanket error for when transformer fails to extract metrics from a single line protocol

Functions

This section is empty.

Types

type Field

type Field struct {
	Key   string
	Value float64
}

Field is a key value pair representing a metric

type Graphite

type Graphite struct {
	Path      string
	Value     float64
	Timestamp int64
}

Graphite contains values of graphite plain text output metric format

type GraphiteList

type GraphiteList []Graphite

GraphiteList contains a list of Graphite values

func ParseGraphite

func ParseGraphite(event *types.Event) GraphiteList

ParseGraphite parses a graphite plain text string into a Graphite struct

func (GraphiteList) Transform

func (g GraphiteList) Transform() []*types.MetricPoint

Transform transforms a metric in graphite plain text format to Sensu Metric Format

type Influx

type Influx struct {
	Measurement string
	TagSet      []*types.MetricTag
	FieldSet    []*Field
	Timestamp   int64
}

Influx contains values of influx db line output metric format

type InfluxList

type InfluxList []Influx

InfluxList contains a list of Influx values

func ParseInflux

func ParseInflux(event *types.Event) InfluxList

ParseInflux parses an influx db line protocol string into an Influx struct

func (InfluxList) Transform

func (i InfluxList) Transform() []*types.MetricPoint

Transform transforms a metric in influx db line protocol to Sensu Metric Format

type Nagios

type Nagios struct {
	Label     string
	Value     float64
	Timestamp int64
}

Nagios contains values of Nagios performance data metric

type NagiosList

type NagiosList []Nagios

NagiosList contains a list of Nagios metrics

func ParseNagios

func ParseNagios(event *types.Event) NagiosList

ParseNagios parses a Nagios perfdata string into a slice of Nagios struct

func (NagiosList) Transform

func (n NagiosList) Transform() []*types.MetricPoint

Transform transforms a metric in Nagio perfdata format to Sensu Metric Format

type OpenTSDB

type OpenTSDB struct {
	Name      string
	Value     float64
	TagSet    []*types.MetricTag
	Timestamp int64
}

OpenTSDB contains values of an OpenTSDB metric

type OpenTSDBList

type OpenTSDBList []OpenTSDB

OpenTSDBList contains a list of OpenTSDB metrics

func ParseOpenTSDB

func ParseOpenTSDB(event *types.Event) OpenTSDBList

ParseOpenTSDB parses OpenTSDB metrics into a list of OpenTSDB structs

func (OpenTSDBList) Transform

func (o OpenTSDBList) Transform() []*types.MetricPoint

Transform transforms metrics in OpenTSDB format to Sensu Metric Format

Jump to

Keyboard shortcuts

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