prometheusremotewritereceiver

package module
v0.0.0-...-30d4c8c Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

README

Prometheus Remote Write Receiver

Status
Stability [inDevelopment]
Supported pipeline types metrics
Distributions [contrib]

Supported pipeline types: metrics

Getting Started

All that is required to enable the Prometheus Remote Write receiver is to include it in the receiver definitions.

receivers:
  prometheusremotewrite:
    time_threshold: 24
    protocols:
      http:

Http Server configuration settings:

  • endpoint (default = 0.0.0.0:19291): host:port to which the receiver is going to receive data.

Additional server settings are mentioned here: https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp#server-configuration

  • time_threshold (default = 24) - time threshold (in hours). All timeseries older than limit will be dropped.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory return a new receiver.Factory for receiver.

Types

type Config

type Config struct {
	// Protocols is the configuration for the supported protocols, currently gRPC and HTTP (Proto and JSON).
	Protocols     `mapstructure:"protocols"`
	TimeThreshold int64 `mapstructure:"time_threshold"`
}

Config defines configuration for the receiver.

func (*Config) Unmarshal

func (cfg *Config) Unmarshal(conf *confmap.Conf) error

Unmarshal a confmap.Conf into the config struct.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks the receiver configuration is valid

type PrometheusRemoteWriteReceiver

type PrometheusRemoteWriteReceiver struct {
	// contains filtered or unexported fields
}

PrometheusRemoteWriteReceiver - remote write

func NewReceiver

func NewReceiver(settings receiver.CreateSettings, config *Config, consumer consumer.Metrics) (*PrometheusRemoteWriteReceiver, error)

NewReceiver - remote write

func (*PrometheusRemoteWriteReceiver) ServeHTTP

func (*PrometheusRemoteWriteReceiver) Shutdown

Shutdown - remote write

func (*PrometheusRemoteWriteReceiver) Start

Start - remote write

type Protocols

type Protocols struct {
	GRPC *configgrpc.GRPCServerSettings `mapstructure:"grpc"`
	HTTP *confighttp.HTTPServerSettings `mapstructure:"http"`
}

Protocols is the configuration for the supported protocols.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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