Deprecate logparser input and recommend tail input as replacement (#7352)

This commit is contained in:
Daniel Nelson
2020-04-16 13:07:03 -07:00
committed by GitHub
parent 3380471e18
commit 73ef0bcba2
4 changed files with 51 additions and 224 deletions

View File

@@ -8,7 +8,6 @@ import (
"sync"
"github.com/influxdata/tail"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/globpath"
"github.com/influxdata/telegraf/plugins/inputs"
@@ -138,6 +137,11 @@ func (l *LogParserPlugin) Description() string {
return "Stream and parse log file(s)."
}
func (l *LogParserPlugin) Init() error {
l.Log.Warnf(`The logparser plugin is deprecated; please use the 'tail' input with the 'grok' data_format`)
return nil
}
// Gather is the primary function to collect the metrics for the plugin
func (l *LogParserPlugin) Gather(acc telegraf.Accumulator) error {
l.Lock()