Add ability to set measurement from matched text in grok parser (#4433)
This commit is contained in:
@@ -11,9 +11,8 @@ import (
|
||||
)
|
||||
|
||||
type File struct {
|
||||
Files []string `toml:"files"`
|
||||
FromBeginning bool
|
||||
parser parsers.Parser
|
||||
Files []string `toml:"files"`
|
||||
parser parsers.Parser
|
||||
|
||||
filenames []string
|
||||
}
|
||||
@@ -24,7 +23,7 @@ const sampleConfig = `
|
||||
## ** as a "super asterisk". ie:
|
||||
## /var/log/**.log -> recursively find all .log files in /var/log
|
||||
## /var/log/*/*.log -> find all .log files with a parent dir in /var/log
|
||||
## /var/log/apache.log -> only tail the apache log file
|
||||
## /var/log/apache.log -> only read the apache log file
|
||||
files = ["/var/log/apache/access.log"]
|
||||
|
||||
## The dataformat to be read from files
|
||||
@@ -40,7 +39,7 @@ func (f *File) SampleConfig() string {
|
||||
}
|
||||
|
||||
func (f *File) Description() string {
|
||||
return "reload and gather from file[s] on telegraf's interval"
|
||||
return "Reload and gather from file[s] on telegraf's interval."
|
||||
}
|
||||
|
||||
func (f *File) Gather(acc telegraf.Accumulator) error {
|
||||
|
||||
Reference in New Issue
Block a user