config

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRegistryFile                         = ".filebeat"
	DefaultIgnoreOlderDuration    time.Duration = 10 * time.Minute
	DefaultScanFrequency          time.Duration = 10 * time.Second
	DefaultSpoolSize              uint64        = 1024
	DefaultIdleTimeout            time.Duration = 5 * time.Second
	DefaultHarvesterBufferSize    int           = 16 << 10 // 16384
	DefaultDocumentType                         = "log"
	DefaultTailFiles                            = false
	DefaultBackoff                              = 1 * time.Second
	DefaultBackoffFactor                        = 2
	DefaultMaxBackoff                           = 10 * time.Second
	DefaultPartialLineWaiting                   = 5 * time.Second
	DefaultForceCloseWindowsFiles               = false
)

Defaults for config variables which are not set

Variables

This section is empty.

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"`
	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                     map[string]string
	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
	PartialLineWaiting         string `yaml:"partial_line_wating"`
	PartialLineWaitingDuration time.Duration
	ForceCloseWindowsFiles     bool `yaml:"force_close_windows_files"`
}

type ProspectorConfig

type ProspectorConfig struct {
	Paths                 []string
	Input                 string
	IgnoreOlder           string `yaml:"ignore_older"`
	IgnoreOlderDuration   time.Duration
	ScanFrequency         string `yaml:"scan_frequency"`
	ScanFrequencyDuration time.Duration
	Harvester             HarvesterConfig `yaml:",inline"`
}

Jump to

Keyboard shortcuts

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