Merge branch 'master' of github.com:influxdata/telegraf into plugin/reader
This commit is contained in:
commit
5529d51df7
5
Makefile
5
Makefile
|
@ -91,6 +91,11 @@ docker-image:
|
||||||
|
|
||||||
plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl
|
plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl
|
||||||
ragel -Z -G2 $^ -o $@
|
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 static
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
.PHONY: deps telegraf install test test-windows lint vet test-all package clean docker-image fmtcheck uint64
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
|
|
|
@ -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. [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. [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)
|
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)
|
1. [Grok](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#grok)
|
||||||
|
=======
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
|
|
||||||
Telegraf metrics, like InfluxDB
|
Telegraf metrics, like InfluxDB
|
||||||
[points](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/),
|
[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]
|
# [inputs.exec.dropwizard_tag_paths]
|
||||||
# tag1 = "tags.tag1"
|
# tag1 = "tags.tag1"
|
||||||
# tag2 = "tags.tag2"
|
# tag2 = "tags.tag2"
|
||||||
|
<<<<<<< HEAD
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Grok
|
#### 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
|
## 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
|
## 3. UTC -- or blank/unspecified, will return timestamp in UTC
|
||||||
timezone = "Canada/Eastern"
|
timezone = "Canada/Eastern"
|
||||||
```
|
```
|
||||||
|
=======
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
|
|
|
@ -1338,6 +1338,7 @@ func buildParser(name string, tbl *ast.Table) (parsers.Parser, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
//for grok data_format
|
//for grok data_format
|
||||||
if node, ok := tbl.Fields["named_patterns"]; ok {
|
if node, ok := tbl.Fields["named_patterns"]; ok {
|
||||||
if kv, ok := node.(*ast.KeyValue); 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
|
c.MetricName = name
|
||||||
|
|
||||||
delete(tbl.Fields, "data_format")
|
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_time_format")
|
||||||
delete(tbl.Fields, "dropwizard_tags_path")
|
delete(tbl.Fields, "dropwizard_tags_path")
|
||||||
delete(tbl.Fields, "dropwizard_tag_paths")
|
delete(tbl.Fields, "dropwizard_tag_paths")
|
||||||
|
<<<<<<< HEAD
|
||||||
delete(tbl.Fields, "named_patterns")
|
delete(tbl.Fields, "named_patterns")
|
||||||
delete(tbl.Fields, "patterns")
|
delete(tbl.Fields, "patterns")
|
||||||
delete(tbl.Fields, "custom_patterns")
|
delete(tbl.Fields, "custom_patterns")
|
||||||
delete(tbl.Fields, "custom_pattern_files")
|
delete(tbl.Fields, "custom_pattern_files")
|
||||||
delete(tbl.Fields, "timezone")
|
delete(tbl.Fields, "timezone")
|
||||||
|
=======
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
|
|
||||||
return parsers.NewParser(c)
|
return parsers.NewParser(c)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// 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
|
// used if TagsPath is empty or doesn't return any tags
|
||||||
DropwizardTagPathsMap map[string]string
|
DropwizardTagPathsMap map[string]string
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
//grok patterns
|
//grok patterns
|
||||||
Patterns []string
|
Patterns []string
|
||||||
|
@ -95,6 +96,8 @@ type Config struct {
|
||||||
CustomPatterns string
|
CustomPatterns string
|
||||||
CustomPatternFiles []string
|
CustomPatternFiles []string
|
||||||
TimeZone string
|
TimeZone string
|
||||||
|
=======
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewParser returns a Parser interface based on the given config.
|
// NewParser returns a Parser interface based on the given config.
|
||||||
|
@ -128,6 +131,7 @@ func NewParser(config *Config) (Parser, error) {
|
||||||
config.DefaultTags,
|
config.DefaultTags,
|
||||||
config.Separator,
|
config.Separator,
|
||||||
config.Templates)
|
config.Templates)
|
||||||
|
<<<<<<< HEAD
|
||||||
case "grok":
|
case "grok":
|
||||||
parser, err = NewGrokParser(
|
parser, err = NewGrokParser(
|
||||||
config.MetricName,
|
config.MetricName,
|
||||||
|
@ -136,6 +140,8 @@ func NewParser(config *Config) (Parser, error) {
|
||||||
config.CustomPatterns,
|
config.CustomPatterns,
|
||||||
config.CustomPatternFiles,
|
config.CustomPatternFiles,
|
||||||
config.TimeZone)
|
config.TimeZone)
|
||||||
|
=======
|
||||||
|
>>>>>>> 23523ffd10bac33b0e40bad98bee4213049109ff
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Invalid data format: %s", config.DataFormat)
|
err = fmt.Errorf("Invalid data format: %s", config.DataFormat)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue