Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { Endpoints []EndpointOptions `alloy:"endpoint,block,optional"` ExternalLabels map[string]string `alloy:"external_labels,attr,optional"` MaxStreams int `alloy:"max_streams,attr,optional"` WAL WalArguments `alloy:"wal,block,optional"` }
Arguments holds values which are used to configure the loki.write component.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the loki.write component.
type EndpointOptions ¶
type EndpointOptions struct { Name string `alloy:"name,attr,optional"` URL string `alloy:"url,attr"` BatchWait time.Duration `alloy:"batch_wait,attr,optional"` BatchSize units.Base2Bytes `alloy:"batch_size,attr,optional"` RemoteTimeout time.Duration `alloy:"remote_timeout,attr,optional"` Headers map[string]string `alloy:"headers,attr,optional"` MinBackoff time.Duration `alloy:"min_backoff_period,attr,optional"` // start backoff at this level MaxBackoff time.Duration `alloy:"max_backoff_period,attr,optional"` // increase exponentially to this level MaxBackoffRetries int `alloy:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries TenantID string `alloy:"tenant_id,attr,optional"` RetryOnHTTP429 bool `alloy:"retry_on_http_429,attr,optional"` HTTPClientConfig *types.HTTPClientConfig `alloy:",squash"` QueueConfig QueueConfig `alloy:"queue_config,block,optional"` }
EndpointOptions describes an individual location to send logs to.
func GetDefaultEndpointOptions ¶
func GetDefaultEndpointOptions() EndpointOptions
GetDefaultEndpointOptions defines the default settings for sending logs to a remote endpoint. The backoff schedule with the default parameters: 0.5s, 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s(4.267m) For a total time of 511.5s (8.5m) before logs are lost.
func (*EndpointOptions) SetToDefault ¶
func (r *EndpointOptions) SetToDefault()
SetToDefault implements syntax.Defaulter.
func (*EndpointOptions) Validate ¶
func (r *EndpointOptions) Validate() error
Validate implements syntax.Validator.
type Exports ¶
type Exports struct {
Receiver loki.LogsReceiver `alloy:"receiver,attr"`
}
Exports holds the receiver that is used to send log entries to the loki.write component.
type QueueConfig ¶
type QueueConfig struct { Capacity units.Base2Bytes `alloy:"capacity,attr,optional"` DrainTimeout time.Duration `alloy:"drain_timeout,attr,optional"` }
QueueConfig controls how the queue logs remote write client is configured. Note that this client is only used when the loki.write component has WAL support enabled.
func (*QueueConfig) SetToDefault ¶
func (q *QueueConfig) SetToDefault()
SetToDefault implements syntax.Defaulter.
type WalArguments ¶
type WalArguments struct { Enabled bool `alloy:"enabled,attr,optional"` MaxSegmentAge time.Duration `alloy:"max_segment_age,attr,optional"` MinReadFrequency time.Duration `alloy:"min_read_frequency,attr,optional"` MaxReadFrequency time.Duration `alloy:"max_read_frequency,attr,optional"` DrainTimeout time.Duration `alloy:"drain_timeout,attr,optional"` }
WalArguments holds the settings for configuring the Write-Ahead Log (WAL) used by the underlying remote write client.
func (*WalArguments) SetToDefault ¶
func (wa *WalArguments) SetToDefault()
func (*WalArguments) Validate ¶
func (wa *WalArguments) Validate() error