Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrokConfig ¶
type GrokConfig struct {
MeasurementName string `toml:"measurement"`
Patterns []string
NamedPatterns []string
CustomPatterns string
CustomPatternFiles []string
Timezone string
UniqueTimestamp string
}
LogParser in the primary interface for the plugin
type LogParserPlugin ¶
type LogParserPlugin struct {
Files []string
FromBeginning bool
WatchMethod string
Log telegraf.Logger
sync.Mutex
GrokParser parsers.Parser
GrokConfig GrokConfig `toml:"grok"`
// contains filtered or unexported fields
}
LogParserPlugin is the primary struct to implement the interface for logparser plugin
func NewLogParser ¶
func NewLogParser() *LogParserPlugin
func (*LogParserPlugin) Description ¶
func (l *LogParserPlugin) Description() string
Description returns the human readable description for the plugin
func (*LogParserPlugin) Gather ¶
func (l *LogParserPlugin) Gather(_ telegraf.Accumulator) error
Gather is the primary function to collect the metrics for the plugin
func (*LogParserPlugin) Init ¶ added in v1.15.0
func (l *LogParserPlugin) Init() error
func (*LogParserPlugin) SampleConfig ¶
func (l *LogParserPlugin) SampleConfig() string
SampleConfig returns the sample configuration for the plugin
func (*LogParserPlugin) Start ¶
func (l *LogParserPlugin) Start(acc telegraf.Accumulator) error
Start kicks off collection of stats for the plugin
func (*LogParserPlugin) Stop ¶
func (l *LogParserPlugin) Stop()
Stop will end the metrics collection process on file tailers
Click to show internal directories.
Click to hide internal directories.