Add support for comma in logparser timestamp format (#4311)

This commit is contained in:
Ayrdrie
2018-06-21 15:19:15 -06:00
committed by Daniel Nelson
parent f9de896427
commit 40432353ef
3 changed files with 24 additions and 1 deletions

View File

@@ -335,6 +335,9 @@ func (p *Parser) ParseLine(line string) (telegraf.Metric, error) {
case DROP:
// goodbye!
default:
// Replace commas with dot character
v = strings.Replace(v, ",", ".", -1)
ts, err := time.ParseInLocation(t, v, p.loc)
if err == nil {
timestamp = ts