{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/1330","repository_url":"https://api.github.com/repos/influxdata/telegraf","labels_url":"https://api.github.com/repos/influxdata/telegraf/issues/1330/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/1330/comments","events_url":"https://api.github.com/repos/influxdata/telegraf/issues/1330/events","html_url":"https://github.com/influxdata/telegraf/issues/1330","id":158482186,"number":1330,"title":"EXEC plugin panics on Freebsd  (panic: runtime error: index out of range)","user":{"login":"lunetics","id":149752,"avatar_url":"https://avatars.githubusercontent.com/u/149752?v=3","gravatar_id":"","url":"https://api.github.com/users/lunetics","html_url":"https://github.com/lunetics","followers_url":"https://api.github.com/users/lunetics/followers","following_url":"https://api.github.com/users/lunetics/following{/other_user}","gists_url":"https://api.github.com/users/lunetics/gists{/gist_id}","starred_url":"https://api.github.com/users/lunetics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunetics/subscriptions","organizations_url":"https://api.github.com/users/lunetics/orgs","repos_url":"https://api.github.com/users/lunetics/repos","events_url":"https://api.github.com/users/lunetics/events{/privacy}","received_events_url":"https://api.github.com/users/lunetics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-04T02:10:40Z","updated_at":"2016-06-04T02:21:12Z","closed_at":null,"body":"I'm getting a crash with latest master build from src on freebsd 10.3 with the exec plugin:\r\n\r\npanic: runtime error: index out of range\r\n\r\n ```\r\ngoroutine 28 [running]:\r\npanic(0x10ac8c0, 0xc820010130)\r\n    /usr/local/go/src/runtime/panic.go:481 +0x3e6\r\ngithub.com/influxdata/telegraf/plugins/inputs/exec.(*Exec).Gather(0xc8201b6000, 0x801cb6f78, 0xc8200834a0, 0x0, 0x0)\r\n    /root/work/src/github.com/influxdata/telegraf/plugins/inputs/exec/exec.go:181 +0x7b5\r\ngithub.com/influxdata/telegraf/agent.gatherWithTimeout.func1(0xc820012660, 0xc820176660, 0xc8200834a0)\r\n    /root/work/src/github.com/influxdata/telegraf/agent/agent.go:161 +0x73\r\ncreated by github.com/influxdata/telegraf/agent.gatherWithTimeout\r\n    /root/work/src/github.com/influxdata/telegraf/agent/agent.go:162 +0xe0\r\n ```\r\n\r\nwith 13.1 everything works fine. just want that zfs plugin\r\n\r\nalso tested the config path with:\r\n ```\r\n    commands = [\"/bin/echo\"]\r\n```"},"comment":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/comments/223730833","html_url":"https://github.com/influxdata/telegraf/issues/1330#issuecomment-223730833","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/1330","id":223730833,"user":{"login":"lunetics","id":149752,"avatar_url":"https://avatars.githubusercontent.com/u/149752?v=3","gravatar_id":"","url":"https://api.github.com/users/lunetics","html_url":"https://github.com/lunetics","followers_url":"https://api.github.com/users/lunetics/followers","following_url":"https://api.github.com/users/lunetics/following{/other_user}","gists_url":"https://api.github.com/users/lunetics/gists{/gist_id}","starred_url":"https://api.github.com/users/lunetics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunetics/subscriptions","organizations_url":"https://api.github.com/users/lunetics/orgs","repos_url":"https://api.github.com/users/lunetics/repos","events_url":"https://api.github.com/users/lunetics/events{/privacy}","received_events_url":"https://api.github.com/users/lunetics/received_events","type":"User","site_admin":false},"created_at":"2016-06-04T02:21:12Z","updated_at":"2016-06-04T02:21:12Z","body":"Just found out adding a space at the end makes the command work. So commands with no parameter give that panic.\r\n\r\nnot a GO dev  but with not args it shouldn't jump to line 181:\r\n\r\n```go\r\ncommands, strings.Join([]string{match, cmdAndArgs[1]}, \" \"))\r\n```\r\n\r\n```\r\n   commands = [\"/bin/echo \"]\r\n```"}}
{"actor":{"display_login":"lunetics"}}