telegrafreceiver

package module
v0.0.0-...-df80c12 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

README

Telegraf Receiver

Telegraf receiver for ingesting metrics from various input plugins into otc pipeline.

Supported pipeline types: metrics

Use case: user configures telegraf input plugins in config for ingestion and otc processors and exporters for data processing and export.

🚧 This receiver is currently in BETA and is considered unstable.

Configuration

The following settings are required:

  • agent_config: Telegraf config. For now it allows to provide agent and input plugins configuration. One can refer to telegraf configuration docs for full list of configuration options.

The Following settings are optional:

  • separate_field (default value is false): Specify whether metric field should be added separately as data point label.

Example:

receivers:
  telegraf:
    separate_field: false
    agent_config: |
      [agent]
        interval = "2s"
        flush_interval = "3s"
      [[inputs.mem]]

The full list of settings exposed for this receiver are documented in config.go.

Limitations

With its current implementation Telegraf receiver has the following limitations:

  • only input plugins can be configured in telegraf agent confugration section (apart from agent's configuration itself). That means that metrics go straight from input plugin to the receiver for translation (into otc data model) without any processing
  • ony telegraf.Gauge metric data is supported, which translated (loosly) into pdata.MetricDataTypeDoubleGauge and pdata.MetricDataTypeIntGauge depending on the underlying data type

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ReceiverFactory

NewFactory creates a factory for telegraf receiver.

Types

type Config

type Config struct {
	*config.ReceiverSettings `mapstructure:"-"`

	// AgentConfig is the yaml config used as telegraf configuration.
	// Please note that only inputs should be configured as all metrics gathered
	// by them will be passed through to otc pipeline for processing and export.
	AgentConfig string `mapstructure:"agent_config"`

	// SeparateField controls whether the ingested metrics should have a field
	// concatenated with metric name like e.g. metric=mem_available or maybe rather
	// have it as a separate label like e.g. metric=mem field=available
	SeparateField bool `mapstructure:"separate_field"`
}

Config defines configuration for the telegraf receiver.

type MetricConverter

type MetricConverter interface {
	Convert(telegraf.Metric) (pdata.Metrics, error)
}

Jump to

Keyboard shortcuts

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