diff --git a/Makefile b/Makefile index bd9d467ba..92395a563 100644 --- a/Makefile +++ b/Makefile @@ -91,6 +91,11 @@ docker-image: plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl ragel -Z -G2 $^ -o $@ +<<<<<<< HEAD .PHONY: deps telegraf install test test-windows lint vet test-all package clean docker-image fmtcheck uint64 static +======= + +.PHONY: deps telegraf install test test-windows lint vet test-all package clean docker-image fmtcheck uint64 +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff diff --git a/docs/DATA_FORMATS_INPUT.md b/docs/DATA_FORMATS_INPUT.md index fa30b54c5..92244ff68 100644 --- a/docs/DATA_FORMATS_INPUT.md +++ b/docs/DATA_FORMATS_INPUT.md @@ -9,7 +9,10 @@ Telegraf is able to parse the following input data formats into metrics: 1. [Nagios](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#nagios) (exec input only) 1. [Collectd](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#collectd) 1. [Dropwizard](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#dropwizard) +<<<<<<< HEAD 1. [Grok](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#grok) +======= +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff Telegraf metrics, like InfluxDB [points](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/), @@ -652,6 +655,7 @@ For more information about the dropwizard json format see # [inputs.exec.dropwizard_tag_paths] # tag1 = "tags.tag1" # tag2 = "tags.tag2" +<<<<<<< HEAD ``` #### Grok @@ -685,4 +689,8 @@ Parse logstash-style "grok" patterns: ## 2. "Canada/Eastern" -- Unix TZ values like those found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ## 3. UTC -- or blank/unspecified, will return timestamp in UTC timezone = "Canada/Eastern" - ``` \ No newline at end of file + ``` +======= + +``` +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff diff --git a/internal/config/config.go b/internal/config/config.go index 1a98c61c5..2275498f4 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1338,6 +1338,7 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) { } } +<<<<<<< HEAD //for grok data_format if node, ok := tbl.Fields["named_patterns"]; ok { if kv, ok := node.(*ast.KeyValue); ok { @@ -1391,6 +1392,8 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) { } } +======= +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff c.MetricName = name delete(tbl.Fields, "data_format") @@ -1406,11 +1409,14 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) { delete(tbl.Fields, "dropwizard_time_format") delete(tbl.Fields, "dropwizard_tags_path") delete(tbl.Fields, "dropwizard_tag_paths") +<<<<<<< HEAD delete(tbl.Fields, "named_patterns") delete(tbl.Fields, "patterns") delete(tbl.Fields, "custom_patterns") delete(tbl.Fields, "custom_pattern_files") delete(tbl.Fields, "timezone") +======= +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff return parsers.NewParser(c) } diff --git a/plugins/parsers/registry.go b/plugins/parsers/registry.go index b657cf83f..aa89644ec 100644 --- a/plugins/parsers/registry.go +++ b/plugins/parsers/registry.go @@ -88,6 +88,7 @@ type Config struct { // an optional map containing tag names as keys and json paths to retrieve the tag values from as values // used if TagsPath is empty or doesn't return any tags DropwizardTagPathsMap map[string]string +<<<<<<< HEAD //grok patterns Patterns []string @@ -95,6 +96,8 @@ type Config struct { CustomPatterns string CustomPatternFiles []string TimeZone string +======= +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff } // NewParser returns a Parser interface based on the given config. @@ -128,6 +131,7 @@ func NewParser(config *Config) (Parser, error) { config.DefaultTags, config.Separator, config.Templates) +<<<<<<< HEAD case "grok": parser, err = NewGrokParser( config.MetricName, @@ -136,6 +140,8 @@ func NewParser(config *Config) (Parser, error) { config.CustomPatterns, config.CustomPatternFiles, config.TimeZone) +======= +>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff default: err = fmt.Errorf("Invalid data format: %s", config.DataFormat) }