{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/1869","repository_url":"https://api.github.com/repos/influxdata/telegraf","labels_url":"https://api.github.com/repos/influxdata/telegraf/issues/1869/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/1869/comments","events_url":"https://api.github.com/repos/influxdata/telegraf/issues/1869/events","html_url":"https://github.com/influxdata/telegraf/issues/1869","id":181988161,"number":1869,"title":"panic: division by zero in statsd allowed_pending_messages","user":{"login":"arussellsaw","id":5236823,"avatar_url":"https://avatars.githubusercontent.com/u/5236823?v=3","gravatar_id":"","url":"https://api.github.com/users/arussellsaw","html_url":"https://github.com/arussellsaw","followers_url":"https://api.github.com/users/arussellsaw/followers","following_url":"https://api.github.com/users/arussellsaw/following{/other_user}","gists_url":"https://api.github.com/users/arussellsaw/gists{/gist_id}","starred_url":"https://api.github.com/users/arussellsaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arussellsaw/subscriptions","organizations_url":"https://api.github.com/users/arussellsaw/orgs","repos_url":"https://api.github.com/users/arussellsaw/repos","events_url":"https://api.github.com/users/arussellsaw/events{/privacy}","received_events_url":"https://api.github.com/users/arussellsaw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-10T11:06:46Z","updated_at":"2016-10-10T11:28:56Z","closed_at":"2016-10-10T11:23:33Z","body":"## Bug report\r\npanic on statsd input where allowed_pending_messages < 1\r\n\r\nminimal PR, looking for quick wins for hacktoberfest 😸 \r\n\r\nfound via a tweet from a pal: https://twitter.com/rubynerd/status/775399499128856576\r\n\r\n### Relevant telegraf.conf:\r\n\r\n```\r\n[[inputs.statsd]]\r\n  allowed_pending_messages = 0\r\n```\r\n\r\n### System info:\r\n\r\ntelegraf 1.0, MacOS 10.10\r\n\r\n### Steps to reproduce:\r\n\r\n1. setup statsd input with 0 allowed_pending_messages\r\n2. get input to start dropping messages\r\n\r\n### Expected behavior:\r\nno panics, either automatically adjusting value or quitting cleanly with error message\r\n\r\n### Actual behavior:\r\na panic of division by zero\r\n\r\n\r\n### Proposal:\r\n\r\n### Current behavior:\r\npanic when dropping messages\r\n### Desired behavior:\r\nadjust pending messages to at least 1, warn the user\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/comments/252592640","html_url":"https://github.com/influxdata/telegraf/issues/1869#issuecomment-252592640","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/1869","id":252592640,"user":{"login":"arussellsaw","id":5236823,"avatar_url":"https://avatars.githubusercontent.com/u/5236823?v=3","gravatar_id":"","url":"https://api.github.com/users/arussellsaw","html_url":"https://github.com/arussellsaw","followers_url":"https://api.github.com/users/arussellsaw/followers","following_url":"https://api.github.com/users/arussellsaw/following{/other_user}","gists_url":"https://api.github.com/users/arussellsaw/gists{/gist_id}","starred_url":"https://api.github.com/users/arussellsaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arussellsaw/subscriptions","organizations_url":"https://api.github.com/users/arussellsaw/orgs","repos_url":"https://api.github.com/users/arussellsaw/repos","events_url":"https://api.github.com/users/arussellsaw/events{/privacy}","received_events_url":"https://api.github.com/users/arussellsaw/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T11:28:56Z","updated_at":"2016-10-10T11:28:56Z","body":"oh no! i thought i'd gotten here in time for hacktoberfest."}}
{"actor":{"display_login":"arussellsaw"}}