Documentation
¶
Overview ¶
Package config provides the log poller configuration.
Index ¶
Constants ¶
View Source
const DefaultBufferSize = 2000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Query query_config.Config `json:"query"`
BufferSize int `json:"buffer_size"`
File string `json:"file"`
Commands [][]string `json:"commands"`
// For each interval, execute the scanning operation
// based on the following config (rather than polling).
// This is to backtrack the old log messages.
Scan *Scan `json:"scan,omitempty"`
// "OR" conditions to select logs.
// An event is generated if any of the filters match.
// Useful for explicit blacklisting "error" logs
// (e.g., GPU error messages in dmesg).
SelectFilters []*query_log_common.Filter `json:"select_filters"`
// "AND" conditions to select logs.
// An event is generated if all of the filters do not match.
// Useful for explicit whitelisting logs and catch all other
// (e.g., good healthy log messages).
RejectFilters []*query_log_common.Filter `json:"reject_filters"`
SeekInfo *tail.SeekInfo `json:"seek_info,omitempty"`
// Used to commit the last seek info to disk.
SeekInfoSyncer func(ctx context.Context, file string, seekInfo tail.SeekInfo) `json:"-"`
}
func ParseConfig ¶
func (*Config) SetDefaultsIfNotSet ¶
func (cfg *Config) SetDefaultsIfNotSet()
Click to show internal directories.
Click to hide internal directories.