carbonreceiver

package module
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 12

README

Carbon Receiver

Status
Stability beta: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @aboguszewski-sumo

The Carbon receiver supports Carbon's plaintext protocol.

ℹ 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.
  • transport (default = tcp): Must be either tcp or udp.

The following setting are optional:

  • tcp_idle_timeout (default = 30s): The maximum duration that a tcp connection will idle wait for new data. This value is ignored if the transport is not tcp.

In addition, a parser section can be defined with the following settings:

  • type (default plaintext): Specifies the type of parser to be used and must be either plaintext or regex.
  • config: Specifies any special configuration of the selected parser.

Example:

receivers:
  carbon/receiver_settings:
    endpoint: localhost:8080
    transport: udp
  carbon/regex:
    parser:
      type: regex
      config:
        rules:
          - regexp: "(?P<key_base>test)\\.env(?P<key_env>[^.]*)\\.(?P<key_host>[^.]*)"
            name_prefix: "name-prefix"
            labels:
              dot.key: dot.value
              key: value
            type: cumulative
          - regexp: "(?P<key_just>test)\\.(?P<key_match>.*)"
        name_separator: "_"

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

Documentation

Overview

Package carbonreceiver implements a receiver that can be used by the OpenTelemetry collector to receive data in the Carbon supported formats. Carbon is the backend used by Graphite, see https://graphite.readthedocs.io/en/latest/carbon-daemons.html

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 Carbon receiver.

Types

type Config

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

	// TCPIdleTimeout is the timout for idle TCP connections, it is ignored
	// if transport being used is UDP.
	TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"`

	// Parser specifies a parser and the respective configuration to be used
	// by the receiver.
	Parser *protocol.Config `mapstructure:"parser"`
}

Config defines configuration for the Carbon receiver.

func (*Config) Validate added in v0.92.0

func (cfg *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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