Documentation ¶
Overview ¶
Package config provides the winlogbeat specific configuration options.
Index ¶
Constants ¶
const (
// DefaultRegistryFile specifies the default filename of the registry file.
DefaultRegistryFile = ".winlogbeat.yml"
)
Variables ¶
This section is empty.
Functions ¶
func IgnoreOlderDuration ¶
IgnoreOlderDuration returns the parsed value of the IgnoreOlder string. If IgnoreOlder is not set then (0, nil) is returned. If IgnoreOlder is not parsable as a duration then an error is returned. See time.ParseDuration.
Types ¶
type EventLogConfig ¶
EventLogConfig holds the configuration data that specifies which event logs to monitor.
func (EventLogConfig) Validate ¶
func (elc EventLogConfig) Validate() error
Validate validates the EventLogConfig data and returns an error describing any problems or nil.
type MetricsConfig ¶
type MetricsConfig struct {
BindAddress string // Bind address for the metric service. Format is host:port.
}
MetricsConfig holds the configuration data for the HTTP metric service.
func (MetricsConfig) Validate ¶
func (mc MetricsConfig) Validate() error
Validate validates the MetricsConfig data and returns an error describing any problems or nil.
type Settings ¶
type Settings struct {
Winlogbeat WinlogbeatConfig
}
Settings is the root of the Winlogbeat configuration data hierarchy.
type Validator ¶
type Validator interface {
Validate() error
}
Validator is the interface for configuration data that can be validating.
Validate reads the configuration and validates all fields. An error describing all problems is returned (versus returning an error only for the first problem encountered).
type WinlogbeatConfig ¶
type WinlogbeatConfig struct { IgnoreOlder string `yaml:"ignore_older"` EventLogs []EventLogConfig `yaml:"event_logs"` Metrics MetricsConfig `yaml:"metrics"` RegistryFile string `yaml:"registry_file"` }
WinlogbeatConfig contains all of Winlogbeat configuration data.
func (WinlogbeatConfig) Validate ¶
func (ebc WinlogbeatConfig) Validate() error
Validate validates the WinlogbeatConfig data and returns an error describing all problems or nil if there are none.