v2

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultsAndValidate

func AddDefaultsAndValidate(cfg *Config) error

Made this public so it can be called when converting config v1 to config v2.

Types

type Config

type Config struct {
	Global  *GlobalConfig  `yaml:",omitempty"`
	Input   *InputConfig   `yaml:",omitempty"`
	Grok    *GrokConfig    `yaml:",omitempty"`
	Metrics *MetricsConfig `yaml:",omitempty"`
	Server  *ServerConfig  `yaml:",omitempty"`
}

func Unmarshal

func Unmarshal(config []byte) (*Config, error)

func (*Config) String

func (cfg *Config) String() string

type GlobalConfig

type GlobalConfig struct {
	ConfigVersion int `yaml:"config_version,omitempty"`
}

type GrokConfig

type GrokConfig struct {
	PatternsDir        string   `yaml:"patterns_dir,omitempty"`
	AdditionalPatterns []string `yaml:"additional_patterns,omitempty"`
}

type InputConfig

type InputConfig struct {
	Type    string `yaml:",omitempty"`
	Path    string `yaml:",omitempty"`
	Readall bool   `yaml:",omitempty"`
}

type MetricConfig

type MetricConfig struct {
	Type           string               `yaml:",omitempty"`
	Name           string               `yaml:",omitempty"`
	Help           string               `yaml:",omitempty"`
	Match          string               `yaml:",omitempty"`
	Value          string               `yaml:",omitempty"`
	Cumulative     bool                 `yaml:",omitempty"`
	Buckets        []float64            `yaml:",flow,omitempty"`
	Quantiles      map[float64]float64  `yaml:",flow,omitempty"`
	Labels         map[string]string    `yaml:",omitempty"`
	LabelTemplates []templates.Template `yaml:"-"` // parsed version of Labels, will not be serialized to yaml.
	ValueTemplate  templates.Template   `yaml:"-"` // parsed version of Value, will not be serialized to yaml.
}

func (*MetricConfig) InitTemplates

func (metric *MetricConfig) InitTemplates() error

Made this public so MetricConfig can be initialized in tests.

type MetricsConfig

type MetricsConfig []*MetricConfig

type ServerConfig

type ServerConfig struct {
	Protocol string `yaml:",omitempty"`
	Host     string `yaml:",omitempty"`
	Port     int    `yaml:",omitempty"`
	Cert     string `yaml:",omitempty"`
	Key      string `yaml:",omitempty"`
}

Jump to

Keyboard shortcuts

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