Fix case of timezone/grok_timezone options. (#4799)
This commit is contained in:
parent
8500d9345f
commit
c3bab78ea8
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ type GrokConfig struct {
|
|||
NamedPatterns []string
|
||||
CustomPatterns string
|
||||
CustomPatternFiles []string
|
||||
TimeZone string
|
||||
Timezone string
|
||||
}
|
||||
|
||||
type logEntry struct {
|
||||
|
@ -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",
|
||||
}
|
||||
|
||||
|
|
|
@ -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"`
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue