wavefrontreceiver

package module
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 7

README

Wavefront Receiver

Status
Stability beta: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @samiura

The Wavefront receiver accepts metrics and depends on carbonreceiver proto and transport, It's very similar to Carbon: it is TCP based in which each received text line represents a single metric data point. They differ on the format of their textual representation. The Wavefront receiver leverages the Carbon receiver code by implementing a dedicated parser for its format.

The receiver receives the string with Wavefront metric data, and transforms it to the collector metric format. See https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax. Each line received represents a Wavefront metric in the following format:

<metricName> <metricValue> [<timestamp>] source=<source> [pointTags]

ℹ The wavefront receiver is based on Carbon and binds to the same port by default. This means the carbon and wavefront receivers cannot both be enabled with their respective default configurations. To support running both receivers in parallel, change the endpoint port on one of the receivers.

Configuration

The following settings are required:

  • endpoint (default = 0.0.0.0:2003): Address and port that the receiver should bind to.

The following setting are optional:

  • extract_collectd_tags (default = false): Instructs the Wavefront receiver to attempt to extract tags in the CollectD format from the metric name.
  • tcp_idle_timeout (default = 30s): The maximum duration that a tcp connection will idle wait for new data.

Example:

receivers:
  wavefront:
  wavefront/allsettings:
    endpoint: localhost:8080
    tcp_idle_timeout: 5s
    extract_collectd_tags: true

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.9.0

func NewFactory() receiver.Factory

NewFactory creates a factory for WaveFront receiver.

Types

type Config

type Config struct {
	confignet.TCPAddrConfig `mapstructure:",squash"`

	// TCPIdleTimeout is the timout for idle TCP connections.
	TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"`

	// ExtractCollectdTags instructs the Wavefront receiver to attempt to extract
	// tags in the CollectD format from the metric name. The default is false.
	ExtractCollectdTags bool `mapstructure:"extract_collectd_tags"`
}

Config defines configuration for the Wavefront receiver.

func (*Config) Validate added in v0.92.0

func (cfg *Config) Validate() error

type WavefrontParser

type WavefrontParser struct {
	ExtractCollectdTags bool `mapstructure:"extract_collectd_tags"`
}

WavefrontParser converts metrics in the Wavefront format, see https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax, into the internal format of the Collector

func (*WavefrontParser) BuildParser

func (wp *WavefrontParser) BuildParser() (protocol.Parser, error)

BuildParser creates a new Parser instance that receives Wavefront metric data.

func (*WavefrontParser) Parse

func (wp *WavefrontParser) Parse(line string) (pmetric.Metric, error)

Parse receives the string with Wavefront metric data, and transforms it to the collector metric format. See https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax.

Each line received represents a Wavefront metric in the following format:

"<metricName> <metricValue> [<timestamp>] source=<source> [pointTags]"

Detailed description of each element is available on the link above.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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