prometheusremotewritereceiver

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 17 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:

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

Overview

Package prometheusremotewritereceiver implements Prometheus Remote Write API for OTLP collector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates new factory of Receiver.

Types

type Config

type Config struct {
	confighttp.ServerConfig `mapstructure:",squash"`
	TimeThreshold           int64 `mapstructure:"time_threshold"`
}

Config defines config for Receiver.

type Receiver

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

Receiver is a Prometheus remote write receiver.

func NewReceiver

func NewReceiver(params receiver.CreateSettings, config *Config, mconsumer consumer.Metrics) (*Receiver, error)

NewReceiver creates new [Start].

func (*Receiver) ServeHTTP

func (rec *Receiver) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Receiver) Shutdown

func (rec *Receiver) Shutdown(context.Context) (err error)

Shutdown implements component.Component.

func (*Receiver) Start

func (rec *Receiver) Start(ctx context.Context, host component.Host) (err error)

Start implements component.Component.

Jump to

Keyboard shortcuts

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