Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicAuth ¶
type BasicAuth struct { Username string `yaml:"username" json:"username"` // UsernameFile string `yaml:"username_file,omitempty" json:"username_file,omitempty"` Password config.Secret `yaml:"password,omitempty" json:"password,omitempty"` }
BasicAuth contains basic HTTP authentication credentials.
type ChunkMetrics ¶
type ChunkMetrics struct {
// contains filtered or unexported fields
}
func NewChunkMetrics ¶
func NewChunkMetrics(r prometheus.Registerer, metricsNamespace string) *ChunkMetrics
type Config ¶
type Config struct { DownsamplePeriod time.Duration `yaml:"downsample_period"` LokiAddr string `yaml:"loki_address,omitempty" doc:"description=The address of the Loki instance to push aggregated metrics to."` WriteTimeout time.Duration `yaml:"timeout,omitempty" doc:"description=The timeout for writing to Loki."` PushPeriod time.Duration `yaml:"push_period,omitempty" doc:"description=How long to wait in between pushes to Loki."` HTTPClientConfig config.HTTPClientConfig `yaml:"http_client_config,omitempty" doc:"description=The HTTP client configuration for pushing metrics to Loki."` UseTLS bool `yaml:"use_tls,omitempty" doc:"description=Whether to use TLS for pushing metrics to Loki."` BasicAuth BasicAuth `yaml:"basic_auth,omitempty" doc:"description=The basic auth configuration for pushing metrics to Loki."` BackoffConfig backoff.Config `yaml:"backoff_config,omitempty" doc:"description=The backoff configuration for pushing metrics to Loki."` }
func (*Config) RegisterFlags ¶
RegisterFlags registers pattern ingester related flags.
type EntryWriter ¶
type Push ¶
type Push struct {
// contains filtered or unexported fields
}
Push is a io.Writer, that writes given log entries by pushing directly to the given loki server URL. Each `Push` instance handles for a single tenant. No batching of log lines happens when sending to Loki.
func NewPush ¶
func NewPush( lokiAddr, tenantID string, timeout time.Duration, pushPeriod time.Duration, cfg config.HTTPClientConfig, username, password string, useTLS bool, backoffCfg *backoff.Config, logger log.Logger, ) (*Push, error)
NewPush creates an instance of `Push` which writes logs directly to given `lokiAddr`
Click to show internal directories.
Click to hide internal directories.