Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultRemoteConfig = RemoteConfig{ WALOptions: DefaultWALOptions, } DefaultQueueConfig = QueueConfig{ Capacity: 2500, MaxShards: 200, MinShards: 1, MaxSamplesPerSend: 500, BatchSendDeadline: 5 * time.Second, MinBackoff: 30 * time.Millisecond, MaxBackoff: 5 * time.Second, RetryOn429: false, } 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 BasicAuthConfig ¶
type BasicAuthConfig struct { Username string `river:"username,attr"` Password rivertypes.Secret `river:"password,attr,optional"` PasswordFile string `river:"password_file,attr,optional"` }
BasicAuthConfig is the metrics_forwarder's configuration for authenticating against the remote system when sending metrics.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the metrics_forwarder component.
func NewComponent ¶
func NewComponent(o component.Options, c RemoteConfig) (*Component, error)
NewComponent creates a new metrics_forwarder component.
func (*Component) Receive ¶
func (c *Component) Receive(ts int64, metricArr []*metrics.FlowMetric)
Receive implements the receiver.receive func that allows an array of metrics to be passed
type Config ¶
type Config struct { Name string `river:"name,attr,optional"` URL string `river:"url,attr"` SendExemplars bool `river:"send_exemplars,attr,optional"` BasicAuth *BasicAuthConfig `river:"basic_auth,block,optional"` QueueConfig *QueueConfig `river:"queue_config,block,optional"` HTTPClientConfig *types.HTTPClientConfig `river:"client_config,block,optional"` }
Config is the metrics_fowarder's configuration for where to send metrics stored in the WAL.
func (*Config) UnmarshalRiver ¶ added in v0.27.0
UnmarshalRiver allows injecting of default values
type QueueConfig ¶ added in v0.27.0
type QueueConfig 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"` RetryOn429 bool `river:"retry_on_http_429,attr,optional"` }
QueueConfig handles the low level queue config options for a remote_write
func (*QueueConfig) UnmarshalRiver ¶ added in v0.27.0
func (r *QueueConfig) UnmarshalRiver(f func(v interface{}) error) error
UnmarshalRiver allows injecting of default values
type RemoteConfig ¶
type RemoteConfig struct { ExternalLabels map[string]string `river:"external_labels,attr,optional"` RemoteWrite []*Config `river:"remote_write,block,optional"` WALOptions WALOptions `river:"wal,block,optional"` }
RemoteConfig represents the input state of the metrics_forwarder component.
func (*RemoteConfig) UnmarshalRiver ¶ added in v0.27.0
func (rc *RemoteConfig) UnmarshalRiver(f func(interface{}) error) error
UnmarshalRiver implements river.Unmarshaler.
type WALOptions ¶ added in v0.27.0
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 ¶ added in v0.27.0
func (o *WALOptions) UnmarshalRiver(f func(interface{}) error) error
UnmarshalRiver implements river.Unmarshaler.