Remove the time_key from the field values in JSON parser (#4951)
This commit is contained in:
@@ -143,6 +143,8 @@ func (p *JSONParser) parseObject(metrics []telegraf.Metric, jsonOut map[string]i
|
||||
}
|
||||
}
|
||||
|
||||
delete(f.Fields, p.JSONTimeKey)
|
||||
|
||||
//if the year is 0, set to current year
|
||||
if nTime.Year() == 0 {
|
||||
nTime = nTime.AddDate(time.Now().Year(), 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user