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,
SampleAgeLimit: 0,
}
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
func InstallTools(cmd *cobra.Command)
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 AzureADConfig ¶ added in v0.37.0
type AzureADConfig struct {
// ManagedIdentity is the managed identity that is being used to authenticate.
ManagedIdentity ManagedIdentityConfig `river:"managed_identity,block"`
// Cloud is the Azure cloud in which the service is running. Example: AzurePublic/AzureGovernment/AzureChina.
Cloud string `river:"cloud,attr,optional"`
}
func (*AzureADConfig) SetToDefault ¶ added in v0.37.0
func (a *AzureADConfig) SetToDefault()
SetToDefault implements river.Defaulter.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the prometheus.remote_write component.
func New ¶ added in v0.35.0
func New(o component.Options, c Arguments) (*Component, error)
New creates a new 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"`
SigV4 *SigV4Config `river:"sigv4,block,optional"`
AzureAD *AzureADConfig `river:"azuread,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.
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 ManagedIdentityConfig ¶ added in v0.37.0
type ManagedIdentityConfig struct {
// ClientID is the clientId of the managed identity that is being used to authenticate.
ClientID string `river:"client_id,attr"`
}
ManagedIdentityConfig is used to store managed identity config values
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"`
SampleAgeLimit time.Duration `river:"sample_age_limit,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 SigV4Config ¶ added in v0.37.0
type SigV4Config struct {
Region string `river:"region,attr,optional"`
AccessKey string `river:"access_key,attr,optional"`
SecretKey rivertypes.Secret `river:"secret_key,attr,optional"`
Profile string `river:"profile,attr,optional"`
RoleARN string `river:"role_arn,attr,optional"`
}
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.