fix: output timestamp with fractional seconds (#9625)

This commit is contained in:
reimda 2021-08-30 09:13:08 -06:00 committed by GitHub
parent 31178e1cf3
commit 2370d39e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ func (g *Graylog) serialize(metric telegraf.Metric) ([]string, error) {
m := make(map[string]interface{})
m["version"] = "1.1"
m["timestamp"] = metric.Time().UnixNano() / 1000000000
m["timestamp"] = float64(metric.Time().UnixNano()) / 1_000_000_000
m["short_message"] = "telegraf"
m["name"] = metric.Name()