Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultsAndValidate ¶
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"` }
type GlobalConfig ¶
type GrokConfig ¶
type InputConfig ¶
type InputConfig struct { Type string `yaml:",omitempty"` Path string `yaml:",omitempty"` FailOnMissingLogfileString string `yaml:"fail_on_missing_logfile,omitempty"` // cannot use bool directly, because yaml.v2 doesn't support true as default value. FailOnMissingLogfile bool `yaml:"-"` Readall bool `yaml:",omitempty"` PollIntervalSeconds string `yaml:"poll_interval_seconds,omitempty"` // TODO: Use time.Duration directly PollInterval time.Duration `yaml:"-"` // parsed version of PollIntervalSeconds MaxLinesInBuffer int `yaml:"max_lines_in_buffer,omitempty"` WebhookPath string `yaml:"webhook_path,omitempty"` WebhookFormat string `yaml:"webhook_format,omitempty"` WebhookJsonSelector string `yaml:"webhook_json_selector,omitempty"` WebhookTextBulkSeparator string `yaml:"webhook_text_bulk_separator,omitempty"` }
type MetricConfig ¶
type MetricConfig struct { Type string `yaml:",omitempty"` Name string `yaml:",omitempty"` Help string `yaml:",omitempty"` Match string `yaml:",omitempty"` Retention time.Duration `yaml:",omitempty"` // implicitly parsed with time.ParseDuration() 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 []template.Template `yaml:"-"` // parsed version of Labels, will not be serialized to yaml. ValueTemplate template.Template `yaml:"-"` // parsed version of Value, will not be serialized to yaml. DeleteMatch string `yaml:"delete_match,omitempty"` DeleteLabels map[string]string `yaml:"delete_labels,omitempty"` // TODO: Make sure that DeleteMatch is not nil if DeleteLabels are used. DeleteLabelTemplates []template.Template `yaml:"-"` // parsed version of DeleteLabels, 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
Click to show internal directories.
Click to hide internal directories.