config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRegistryFile                      = ".filebeat"
	DefaultIgnoreOlderDuration time.Duration = 0
	DefaultCloseOlderDuration  time.Duration = 1 * time.Hour
	DefaultScanFrequency       time.Duration = 10 * time.Second
	DefaultSpoolSize           uint64        = 2048
	DefaultIdleTimeout         time.Duration = 5 * time.Second
	DefaultHarvesterBufferSize int           = 16 << 10 // 16384
	DefaultInputType                         = "log"
	DefaultDocumentType                      = "log"
	DefaultTailFiles                         = false
	DefaultBackoff                           = 1 * time.Second
	DefaultBackoffFactor                     = 2
	DefaultMaxBackoff                        = 10 * time.Second
	DefaultForceCloseFiles                   = false
)

Defaults for config variables which are not set

View Source
const (
	LogInputType   = "log"
	StdinInputType = "stdin"
)

Variables

View Source
var ValidInputType = map[string]struct{}{
	StdinInputType: {},
	LogInputType:   {},
}

List of valid input types

Functions

This section is empty.

Types

type Config

type Config struct {
	Filebeat FilebeatConfig
}

func (*Config) FetchConfigs

func (config *Config) FetchConfigs()

Fetches and merges all config files given by configDir. All are put into one config object

type FilebeatConfig

type FilebeatConfig struct {
	Prospectors         []ProspectorConfig
	SpoolSize           uint64 `yaml:"spool_size"`
	PublishAsync        bool   `yaml:"publish_async"`
	IdleTimeout         string `yaml:"idle_timeout"`
	IdleTimeoutDuration time.Duration
	RegistryFile        string `yaml:"registry_file"`
	ConfigDir           string `yaml:"config_dir"`
}

type HarvesterConfig

type HarvesterConfig struct {
	InputType          string `yaml:"input_type"`
	Fields             common.MapStr
	FieldsUnderRoot    bool   `yaml:"fields_under_root"`
	BufferSize         int    `yaml:"harvester_buffer_size"`
	TailFiles          bool   `yaml:"tail_files"`
	Encoding           string `yaml:"encoding"`
	DocumentType       string `yaml:"document_type"`
	Backoff            string `yaml:"backoff"`
	BackoffDuration    time.Duration
	BackoffFactor      int    `yaml:"backoff_factor"`
	MaxBackoff         string `yaml:"max_backoff"`
	MaxBackoffDuration time.Duration
	ForceCloseFiles    bool             `yaml:"force_close_files"`
	ExcludeLines       []string         `yaml:"exclude_lines"`
	IncludeLines       []string         `yaml:"include_lines"`
	MaxBytes           *int             `yaml:"max_bytes"`
	Multiline          *MultilineConfig `yaml:"multiline"`
}

type MultilineConfig

type MultilineConfig struct {
	Pattern  string `yaml:"pattern"`
	Negate   bool   `yaml:"negate"`
	Match    string `yaml:"match"`
	MaxLines *int   `yaml:"max_lines"`
	Timeout  string `yaml:"timeout"`
}

type ProspectorConfig

type ProspectorConfig struct {
	Paths                 []string
	Input                 string
	IgnoreOlder           string `yaml:"ignore_older"`
	IgnoreOlderDuration   time.Duration
	CloseOlder            string `yaml:"close_older"`
	CloseOlderDuration    time.Duration
	ScanFrequency         string `yaml:"scan_frequency"`
	ScanFrequencyDuration time.Duration
	Harvester             HarvesterConfig `yaml:",inline"`
	ExcludeFiles          []string        `yaml:"exclude_files"`
	ExcludeFilesRegexp    []*regexp.Regexp
}

Jump to

Keyboard shortcuts

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