remotewrite

package
v0.33.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultArguments = Arguments{
		WALOptions: DefaultWALOptions,
	}

	DefaultQueueOptions = QueueOptions{
		Capacity:          10000,
		MaxShards:         50,
		MinShards:         1,
		MaxSamplesPerSend: 2000,
		BatchSendDeadline: 5 * time.Second,
		MinBackoff:        30 * time.Millisecond,
		MaxBackoff:        5 * time.Second,
		RetryOnHTTP429:    false,
	}

	DefaultMetadataOptions = MetadataOptions{
		Send:              true,
		SendInterval:      1 * time.Minute,
		MaxSamplesPerSend: 2000,
	}

	DefaultWALOptions = WALOptions{
		TruncateFrequency: 2 * time.Hour,
		MinKeepaliveTime:  5 * time.Minute,
		MaxKeepaliveTime:  8 * time.Hour,
	}
)

Defaults for config blocks.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	ExternalLabels map[string]string  `river:"external_labels,attr,optional"`
	Endpoints      []*EndpointOptions `river:"endpoint,block,optional"`
	WALOptions     WALOptions         `river:"wal,block,optional"`
}

Arguments represents the input state of the prometheus.remote_write component.

func (*Arguments) UnmarshalRiver

func (rc *Arguments) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver implements river.Unmarshaler.

type Component

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

Component is the prometheus.remote_write component.

func NewComponent

func NewComponent(o component.Options, c Arguments) (*Component, error)

NewComponent creates a new prometheus.remote_write component.

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run implements Component.

func (*Component) Update

func (c *Component) Update(newConfig component.Arguments) error

Update implements Component.

type EndpointOptions

type EndpointOptions struct {
	Name                 string                  `river:"name,attr,optional"`
	URL                  string                  `river:"url,attr"`
	RemoteTimeout        time.Duration           `river:"remote_timeout,attr,optional"`
	Headers              map[string]string       `river:"headers,attr,optional"`
	SendExemplars        bool                    `river:"send_exemplars,attr,optional"`
	SendNativeHistograms bool                    `river:"send_native_histograms,attr,optional"`
	HTTPClientConfig     *types.HTTPClientConfig `river:",squash"`
	QueueOptions         *QueueOptions           `river:"queue_config,block,optional"`
	MetadataOptions      *MetadataOptions        `river:"metadata_config,block,optional"`
}

EndpointOptions describes an individual location for where metrics in the WAL should be delivered to using the remote_write protocol.

func GetDefaultEndpointOptions added in v0.32.0

func GetDefaultEndpointOptions() EndpointOptions

func (*EndpointOptions) UnmarshalRiver

func (r *EndpointOptions) UnmarshalRiver(f func(v interface{}) error) error

UnmarshalRiver implements river.Unmarshaler.

type Exports

type Exports struct {
	Receiver storage.Appendable `river:"receiver,attr"`
}

Exports are the set of fields exposed by the prometheus.remote_write component.

type MetadataOptions

type MetadataOptions struct {
	Send              bool          `river:"send,attr,optional"`
	SendInterval      time.Duration `river:"send_interval,attr,optional"`
	MaxSamplesPerSend int           `river:"max_samples_per_send,attr,optional"`
}

MetadataOptions configures how metadata gets sent over the remote_write protocol.

func (*MetadataOptions) UnmarshalRiver

func (o *MetadataOptions) UnmarshalRiver(f func(v interface{}) error) error

UnmarshalRiver allows injecting of default values

type QueueOptions

type QueueOptions struct {
	Capacity          int           `river:"capacity,attr,optional"`
	MaxShards         int           `river:"max_shards,attr,optional"`
	MinShards         int           `river:"min_shards,attr,optional"`
	MaxSamplesPerSend int           `river:"max_samples_per_send,attr,optional"`
	BatchSendDeadline time.Duration `river:"batch_send_deadline,attr,optional"`
	MinBackoff        time.Duration `river:"min_backoff,attr,optional"`
	MaxBackoff        time.Duration `river:"max_backoff,attr,optional"`
	RetryOnHTTP429    bool          `river:"retry_on_http_429,attr,optional"`
}

QueueOptions handles the low level queue config options for a remote_write

func (*QueueOptions) UnmarshalRiver

func (r *QueueOptions) UnmarshalRiver(f func(v interface{}) error) error

UnmarshalRiver allows injecting of default values

type WALOptions

type WALOptions struct {
	TruncateFrequency time.Duration `river:"truncate_frequency,attr,optional"`
	MinKeepaliveTime  time.Duration `river:"min_keepalive_time,attr,optional"`
	MaxKeepaliveTime  time.Duration `river:"max_keepalive_time,attr,optional"`
}

WALOptions configures behavior within the WAL.

func (*WALOptions) UnmarshalRiver

func (o *WALOptions) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver implements river.Unmarshaler.

Jump to

Keyboard shortcuts

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