Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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: true, } 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 ¶
func InstallTools ¶ added in v0.35.0
InstallTools installs command line utilities as subcommands of the provided cmd.
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) SetToDefault ¶ added in v0.35.0
func (rc *Arguments) SetToDefault()
SetToDefault implements river.Defaulter.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the prometheus.remote_write 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"` WriteRelabelConfigs []*flow_relabel.Config `river:"write_relabel_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) SetToDefault ¶ added in v0.35.0
func (r *EndpointOptions) SetToDefault()
SetToDefault implements river.Defaulter.
func (*EndpointOptions) Validate ¶ added in v0.35.0
func (r *EndpointOptions) Validate() error
Validate implements river.Validator.
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) SetToDefault ¶ added in v0.35.0
func (o *MetadataOptions) SetToDefault()
SetToDefault implements river.Defaulter.
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) SetToDefault ¶ added in v0.35.0
func (r *QueueOptions) SetToDefault()
SetToDefault implements river.Defaulter.
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) SetToDefault ¶ added in v0.35.0
func (o *WALOptions) SetToDefault()
SetToDefault implements river.Defaulter.
func (*WALOptions) Validate ¶ added in v0.35.0
func (o *WALOptions) Validate() error
Validate implements river.Validator.