You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agree this is a bug though. Parser should throw a graceful error rather than panic. Dunno that this'll get fixed though if the plan is to switch parsers (#1598).
sparrc
added
bug
unexpected problem or unintended behavior
panic
issue that results in panics from Telegraf
labels
Oct 24, 2016
sparrc
changed the title
Telegraf Crashes on startup when using snmp plugin
TOML internal.Duration marshaller panics on integers
Oct 24, 2016
Bug report
telegraf crashes with snmp input pointed to bigswitch
Relevant telegraf.conf:
'''
[[outputs.influxdb]]
urls = ["http://influxdbmaster:8086"] # required
database = "telegraf" # required
retention_policy = ""
write_consistency = "any"
timeout = "5s"
[[inputs.snmp]]
interval = "15s"
retries = 2
timeout = 5
version = 2
community="public"
agents = [ "bs1.example.tld", "bs2.example.tld" ]
[[inputs.snmp.table]]
name="bigswitch"
'''
System info:
telegraf 1.0.0
influxdb 1.0.0
alpine linux
Steps to reproduce:
start telegraf
Expected behavior
Telegraf started and connected to influx
Actual behavior:
/ # telegraf
2016/10/21 20:39:22 Using config file: /etc/telegraf/telegraf.conf
panic: runtime error: slice bounds out of range
Additional info:
goroutine 1 [running]:
panic(0x12904a0, 0xc82000a050)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/influxdata/telegraf/internal.(*Duration).UnmarshalTOML(0xc82014b7b8, 0xc8201a4a68, 0x1, 0x8, 0x0, 0x0)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/internal/internal.go:39 +0x270
github.com/influxdata/toml.setUnmarshaler(0x1262080, 0xc82014b7b8, 0x199, 0xc8201a4a60, 0x1, 0x0, 0x0, 0xc8201a4a40)
/home/ubuntu/telegraf-build/src/github.com/influxdata/toml/decode.go:230 +0x2ec
github.com/influxdata/toml.setValue(0x1262080, 0xc82014b7b8, 0x199, 0x7f3ad67eeb18, 0xc8200136c0, 0x0, 0x0)
The text was updated successfully, but these errors were encountered: