Skip to content

Commit

Permalink
Fix case of timezone/grok_timezone options. (influxdata#4799)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored and otherpirate committed Mar 15, 2019
1 parent 6261ee6 commit fbc44a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ func getParserConfig(name string, tbl *ast.Table) (*parsers.Config, error) {
if node, ok := tbl.Fields["grok_timezone"]; ok {
if kv, ok := node.(*ast.KeyValue); ok {
if str, ok := kv.Value.(*ast.String); ok {
c.GrokTimeZone = str.Value
c.GrokTimezone = str.Value
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/logparser/logparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type GrokConfig struct {
NamedPatterns []string
CustomPatterns string
CustomPatternFiles []string
TimeZone string
Timezone string
}

type logEntry struct {
Expand Down Expand Up @@ -137,7 +137,7 @@ func (l *LogParserPlugin) Start(acc telegraf.Accumulator) error {
GrokNamedPatterns: l.GrokConfig.NamedPatterns,
GrokCustomPatterns: l.GrokConfig.CustomPatterns,
GrokCustomPatternFiles: l.GrokConfig.CustomPatternFiles,
GrokTimeZone: l.GrokConfig.TimeZone,
GrokTimezone: l.GrokConfig.Timezone,
DataFormat: "grok",
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/parsers/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type Config struct {
GrokNamedPatterns []string
GrokCustomPatterns string
GrokCustomPatternFiles []string
GrokTimeZone string
GrokTimezone string

//csv configuration
CSVColumnNames []string `toml:"csv_column_names"`
Expand Down Expand Up @@ -185,7 +185,7 @@ func NewParser(config *Config) (Parser, error) {
config.GrokNamedPatterns,
config.GrokCustomPatterns,
config.GrokCustomPatternFiles,
config.GrokTimeZone)
config.GrokTimezone)
case "csv":
parser, err = newCSVParser(config.MetricName,
config.CSVHeaderRowCount,
Expand Down

0 comments on commit fbc44a3

Please sign in to comment.