docker will spin up

This commit is contained in:
Max U 2018-06-26 11:26:43 -07:00
parent 79d9ea4761
commit bbd68b3820
4 changed files with 6 additions and 28 deletions

View File

@ -1393,14 +1393,6 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) {
c.MetricName = name
if node, ok := tbl.Fields["name_override"]; ok {
if kv, ok := node.(*ast.KeyValue); ok {
if str, ok := kv.Value.(*ast.String); ok {
c.MetricName = str.Value
}
}
}
delete(tbl.Fields, "data_format")
delete(tbl.Fields, "separator")
delete(tbl.Fields, "templates")
@ -1419,7 +1411,6 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) {
delete(tbl.Fields, "custom_patterns")
delete(tbl.Fields, "custom_pattern_files")
delete(tbl.Fields, "timezone")
delete(tbl.Fields, "name_override")
return parsers.NewParser(c)
}

View File

@ -1,13 +0,0 @@
version: '3'
# services:
telegraf:
image: glinton/scratch
volumes:
- ./telegraf.conf:/telegraf.conf
- ../../../../telegraf:/telegraf
- ./test.log:/var/log/test.log
entrypoint:
- /telegraf
- --config
- /telegraf.conf

View File

@ -69,22 +69,22 @@
# ## /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
files = ["/Users/maxu/go/src/github.com/influxdata/telegraf/plugins/inputs/reader/testfiles/grok_a.log"]
files = ["/var/log/test.log"]
#
# ## The dataformat to be read from files
# ## Each data format has its own unique set of configuration options, read
# ## more about them here:
# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "grok"
data_format = "json"
#
patterns = ["%{COMMON_LOG_FORMAT}"]
#patterns = ["%{TEST_LOG_B}","%{TEST_LOG_A}"]
#
# ## Name of the outputted measurement name.
measurement = "grok_reader"
#name_override = "grok_reader"
#
# ## Full path(s) to custom pattern files.
# custom_pattern_files = []
#custom_pattern_files = ["/Users/maxu/go/src/github.com/influxdata/telegraf/plugins/inputs/logparser/grok/testdata/test-patterns"]
#
# ## Custom patterns can also be defined here. Put one pattern per line.
# custom_patterns = '''

View File

@ -18,7 +18,7 @@ type Reader struct {
Filenames []string
}
const sampleConfig = `## Files to parse.
const sampleConfig = `## Files to parse each interval.
## These accept standard unix glob matching rules, but with the addition of
## ** as a "super asterisk". ie:
## /var/log/**.log -> recursively find all .log files in /var/log