Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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