Telegraf should start and pass metrics to output.
2021-02-07T17:23:17Z I! Starting Telegraf 1.17.2
panic: reflect: call of reflect.Value.Elem on int64 Value
goroutine 1 [running]:
reflect.Value.Elem(0x2c92bc0, 0x495f780, 0x86, 0x0, 0x0, 0x1)
/usr/local/go/src/reflect/value.go:843 +0x1a5
github.com/influxdata/telegraf/config.(*Config).getFieldDuration(0xc0002842a0, 0xc0000ac820, 0x2ef3a10, 0xc, 0x2c92bc0, 0x495f780)
/go/src/github.com/influxdata/telegraf/config/config.go:1459 +0x3b8
github.com/influxdata/telegraf/config.(*Config).buildOutput(0xc0002842a0, 0xc000842160, 0x11, 0xc0000ac820, 0x0, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/config/config.go:1395 +0x1c7
github.com/influxdata/telegraf/config.(*Config).addOutput(0xc0002842a0, 0xc000842160, 0x11, 0xc0000ac820, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/config/config.go:1058 +0xf1
github.com/influxdata/telegraf/config.(*Config).LoadConfigData(0xc0002842a0, 0xc0005b4000, 0x50a, 0x70a, 0x70a, 0x0)
/go/src/github.com/influxdata/telegraf/config/config.go:801 +0xbed
github.com/influxdata/telegraf/config.(*Config).LoadConfig(0xc0002842a0, 0x7fffe859984e, 0x1b, 0x1, 0x1)
/go/src/github.com/influxdata/telegraf/config/config.go:728 +0x158
main.runAgent(0x3490f80, 0xc00002eac0, 0x4a8e4d0, 0x0, 0x0, 0x4a8e4d0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:127 +0x14b
main.reloadLoop(0x4a8e4d0, 0x0, 0x0, 0x4a8e4d0, 0x0, 0x0, 0xc00022dd08, 0x0, 0x0, 0xc00022dd08, ...)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:110 +0x267
main.run(...)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:7
main.main()
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:361 +0x71e
Relevant telegraf.conf:
System info:
Telegraf version: 1.17.2
OS: Debian 6.10, Ubuntu 16
Steps to reproduce:
Expected behavior:
Telegraf should start and pass metrics to output.
Actual behavior:
Telegraf failed to start with panic:
Additional info:
Seems like issue related with this bug:
telegraf/config/config.go
Line 1395 in 74011e2
telegraf/config/config.go
Line 1395 in 86e50f8
I believe string should be corrected to