filelog

package
v1.7.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package filelog provides an otelcol.receiver.filelog component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	MatchCriteria           MatchCriteria            `alloy:",squash"`
	PollInterval            time.Duration            `alloy:"poll_interval,attr,optional"`
	MaxConcurrentFiles      int                      `alloy:"max_concurrent_files,attr,optional"`
	MaxBatches              int                      `alloy:"max_batches,attr,optional"`
	StartAt                 string                   `alloy:"start_at,attr,optional"`
	FingerprintSize         units.Base2Bytes         `alloy:"fingerprint_size,attr,optional"`
	MaxLogSize              units.Base2Bytes         `alloy:"max_log_size,attr,optional"`
	Encoding                string                   `alloy:"encoding,attr,optional"`
	FlushPeriod             time.Duration            `alloy:"force_flush_period,attr,optional"`
	DeleteAfterRead         bool                     `alloy:"delete_after_read,attr,optional"`
	IncludeFileRecordNumber bool                     `alloy:"include_file_record_number,attr,optional"`
	Compression             string                   `alloy:"compression,attr,optional"`
	AcquireFSLock           bool                     `alloy:"acquire_fs_lock,attr,optional"`
	MultilineConfig         *otelcol.MultilineConfig `alloy:"multiline,block,optional"`
	TrimConfig              *otelcol.TrimConfig      `alloy:",squash"`
	Header                  *HeaderConfig            `alloy:"header,block,optional"`
	Resolver                Resolver                 `alloy:",squash"`

	Attributes map[string]string `alloy:"attributes,attr,optional"`
	Resource   map[string]string `alloy:"resource,attr,optional"`

	Operators     []otelcol.Operator             `alloy:"operators,attr,optional"`
	ConsumerRetry otelcol.ConsumerRetryArguments `alloy:"retry_on_failure,block,optional"`

	// DebugMetrics configures component internal metrics. Optional.
	DebugMetrics otelcolCfg.DebugMetricsArguments `alloy:"debug_metrics,block,optional"`

	// Output configures where to send received data. Required.
	Output *otelcol.ConsumerArguments `alloy:"output,block"`
}

Arguments configures the otelcol.receiver.filelog component.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements receiver.Arguments.

func (Arguments) DebugMetricsConfig

func (args Arguments) DebugMetricsConfig() otelcolCfg.DebugMetricsArguments

DebugMetricsConfig implements receiver.Arguments.

func (Arguments) Exporters

func (args Arguments) Exporters() map[pipeline.Signal]map[otelcomponent.ID]otelcomponent.Component

Exporters implements receiver.Arguments.

func (Arguments) Extensions

func (args Arguments) Extensions() map[otelcomponent.ID]otelcomponent.Component

Extensions implements receiver.Arguments.

func (Arguments) NextConsumers

func (args Arguments) NextConsumers() *otelcol.ConsumerArguments

NextConsumers implements receiver.Arguments.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type HeaderConfig

type HeaderConfig struct {
	Pattern           string             `alloy:"pattern,attr"`
	MetadataOperators []otelcol.Operator `alloy:"metadata_operators,attr"`
}

type MatchCriteria

type MatchCriteria struct {
	Include []string `alloy:"include,attr"`
	Exclude []string `alloy:"exclude,attr,optional"`

	ExcludeOlderThan time.Duration     `alloy:"exclude_older_than,attr,optional"`
	OrderingCriteria *OrderingCriteria `alloy:"ordering_criteria,block,optional"`
}

type OrderingCriteria

type OrderingCriteria struct {
	Regex   string `alloy:"regex,attr,optional"`
	TopN    int    `alloy:"top_n,attr,optional"`
	SortBy  []Sort `alloy:"sort_by,block"`
	GroupBy string `alloy:"group_by,attr,optional"`
}

type Resolver

type Resolver struct {
	IncludeFileName           bool `alloy:"include_file_name,attr,optional"`
	IncludeFilePath           bool `alloy:"include_file_path,attr,optional"`
	IncludeFileNameResolved   bool `alloy:"include_file_name_resolved,attr,optional"`
	IncludeFilePathResolved   bool `alloy:"include_file_path_resolved,attr,optional"`
	IncludeFileOwnerName      bool `alloy:"include_file_owner_name,attr,optional"`
	IncludeFileOwnerGroupName bool `alloy:"include_file_owner_group_name,attr,optional"`
}

type Sort

type Sort struct {
	SortType  string `alloy:"sort_type,attr,optional"`
	RegexKey  string `alloy:"regex_key,attr,optional"`
	Ascending bool   `alloy:"ascending,attr,optional"`

	// Timestamp only
	Layout   string `alloy:"layout,attr,optional"`
	Location string `alloy:"location,attr,optional"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL