Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultArguments = Arguments{ WALOptions: DefaultWALOptions, } DefaultEndpointOptions = EndpointOptions{ RemoteTimeout: 30 * time.Second, SendExemplars: true, } DefaultQueueOptions = QueueOptions{ Capacity: 2500, MaxShards: 200, MinShards: 1, MaxSamplesPerSend: 500, BatchSendDeadline: 5 * time.Second, MinBackoff: 30 * time.Millisecond, MaxBackoff: 5 * time.Second, RetryOnHTTP429: false, } DefaultMetadataOptions = MetadataOptions{ Send: true, SendInterval: 1 * time.Minute, MaxSamplesPerSend: 500, } 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 ¶
UnmarshalRiver implements river.Unmarshaler.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the prometheus.remote_write component.
func NewComponent ¶
NewComponent creates a new prometheus.remote_write component.
func (*Component) Receive ¶
func (c *Component) Receive(ts int64, metricArr []*prometheus.FlowMetric)
Receive implements the receiver.receive func that allows an array of metrics to be passed
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"` HTTPClientConfig *types.HTTPClientConfig `river:"http_client_config,block,optional"` 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 (*EndpointOptions) UnmarshalRiver ¶
func (r *EndpointOptions) UnmarshalRiver(f func(v interface{}) error) error
UnmarshalRiver implements river.Unmarshaler.
type Exports ¶
type Exports struct {
Receiver *prometheus.Receiver `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.