{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/comments/58127237","id":58127237,"diff_hunk":"@@ -104,8 +104,52 @@ func TestServerWithoutChecks(t *testing.T) {\n \t\t// csvParseFailures\n \t\tt.Errorf(\"expected %f csv parse failures, got %f\", expect, got)\n \t}\n-\t// Suck up the remaining metrics.\n-\tfor _ = range ch {\n+\n+\tgot := 0\n+\tfor range ch {\n+\t\tgot += 1\n+\t}\n+\tif expect := len(e.serverMetrics) - 1; got != expect {\n+\t\tt.Errorf(\"expected %d metrics, got %d\", expect, got)\n+\t}\n+}\n+\n+func TestServerBrokenCSV(t *testing.T) {","path":"haproxy_exporter_test.go","position":null,"original_position":16,"commit_id":"0e520c18188cd576cada006e885865fce3fe1778","original_commit_id":"6c8c5868fcb303d299abeca0775dc8548e159cad","user":{"login":"grobie","id":3432,"avatar_url":"https://avatars.githubusercontent.com/u/3432?v=3","gravatar_id":"","url":"https://api.github.com/users/grobie","html_url":"https://github.com/grobie","followers_url":"https://api.github.com/users/grobie/followers","following_url":"https://api.github.com/users/grobie/following{/other_user}","gists_url":"https://api.github.com/users/grobie/gists{/gist_id}","starred_url":"https://api.github.com/users/grobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grobie/subscriptions","organizations_url":"https://api.github.com/users/grobie/orgs","repos_url":"https://api.github.com/users/grobie/repos","events_url":"https://api.github.com/users/grobie/events{/privacy}","received_events_url":"https://api.github.com/users/grobie/received_events","type":"User","site_admin":false},"body":"Done. I couldn't find a commit immediately, but the haproxy mailing list is the most commonly linked source for HAProxy topics.","created_at":"2016-03-31T21:02:32Z","updated_at":"2016-03-31T21:02:32Z","html_url":"https://github.com/prometheus/haproxy_exporter/pull/46#discussion_r58127237","pull_request_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/comments/58127237"},"html":{"href":"https://github.com/prometheus/haproxy_exporter/pull/46#discussion_r58127237"},"pull_request":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46","id":64854908,"html_url":"https://github.com/prometheus/haproxy_exporter/pull/46","diff_url":"https://github.com/prometheus/haproxy_exporter/pull/46.diff","patch_url":"https://github.com/prometheus/haproxy_exporter/pull/46.patch","issue_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/46","number":46,"state":"open","locked":false,"title":"Handle invalid CSV lines gracefully","user":{"login":"grobie","id":3432,"avatar_url":"https://avatars.githubusercontent.com/u/3432?v=3","gravatar_id":"","url":"https://api.github.com/users/grobie","html_url":"https://github.com/grobie","followers_url":"https://api.github.com/users/grobie/followers","following_url":"https://api.github.com/users/grobie/following{/other_user}","gists_url":"https://api.github.com/users/grobie/gists{/gist_id}","starred_url":"https://api.github.com/users/grobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grobie/subscriptions","organizations_url":"https://api.github.com/users/grobie/orgs","repos_url":"https://api.github.com/users/grobie/repos","events_url":"https://api.github.com/users/grobie/events{/privacy}","received_events_url":"https://api.github.com/users/grobie/received_events","type":"User","site_admin":false},"body":"Haproxy versions <1.6.4 respond with invalid CSV lines when a server\r\ngot drained via an agent[0]. This caused the haproxy_exporter to stop\r\nreporting any metrics for following metrics.\r\n\r\n[0]: http://permalink.gmane.org/gmane.comp.web.haproxy/27011\r\n\r\nFixes #45.\r\n\r\n@matthiasr @bitfehler","created_at":"2016-03-31T20:39:23Z","updated_at":"2016-03-31T21:02:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7de3041669ea0a77174ef41c061fdcec1234486","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46/commits","review_comments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46/comments","review_comment_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/46/comments","statuses_url":"https://api.github.com/repos/prometheus/haproxy_exporter/statuses/0e520c18188cd576cada006e885865fce3fe1778","head":{"label":"prometheus:fix-state-parser","ref":"fix-state-parser","sha":"0e520c18188cd576cada006e885865fce3fe1778","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":7939398,"name":"haproxy_exporter","full_name":"prometheus/haproxy_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/haproxy_exporter","description":"Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption","fork":false,"url":"https://api.github.com/repos/prometheus/haproxy_exporter","forks_url":"https://api.github.com/repos/prometheus/haproxy_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/haproxy_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/haproxy_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/haproxy_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/haproxy_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/haproxy_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/haproxy_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/haproxy_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/haproxy_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/haproxy_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/haproxy_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/haproxy_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/haproxy_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/haproxy_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/haproxy_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/haproxy_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/haproxy_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/haproxy_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/haproxy_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/haproxy_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/haproxy_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/haproxy_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/haproxy_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/haproxy_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/haproxy_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/deployments","created_at":"2013-01-31T15:33:01Z","updated_at":"2016-03-22T11:46:25Z","pushed_at":"2016-03-31T21:01:20Z","git_url":"git://github.com/prometheus/haproxy_exporter.git","ssh_url":"git@github.com:prometheus/haproxy_exporter.git","clone_url":"https://github.com/prometheus/haproxy_exporter.git","svn_url":"https://github.com/prometheus/haproxy_exporter","homepage":"","size":86,"stargazers_count":34,"watchers_count":34,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":34,"default_branch":"master"}},"base":{"label":"prometheus:master","ref":"master","sha":"ba4da363c3b95383339073b3d714b6af41722649","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":7939398,"name":"haproxy_exporter","full_name":"prometheus/haproxy_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/haproxy_exporter","description":"Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption","fork":false,"url":"https://api.github.com/repos/prometheus/haproxy_exporter","forks_url":"https://api.github.com/repos/prometheus/haproxy_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/haproxy_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/haproxy_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/haproxy_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/haproxy_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/haproxy_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/haproxy_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/haproxy_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/haproxy_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/haproxy_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/haproxy_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/haproxy_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/haproxy_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/haproxy_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/haproxy_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/haproxy_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/haproxy_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/haproxy_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/haproxy_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/haproxy_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/haproxy_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/haproxy_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/haproxy_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/haproxy_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/haproxy_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/haproxy_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/haproxy_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/haproxy_exporter/deployments","created_at":"2013-01-31T15:33:01Z","updated_at":"2016-03-22T11:46:25Z","pushed_at":"2016-03-31T21:01:20Z","git_url":"git://github.com/prometheus/haproxy_exporter.git","ssh_url":"git@github.com:prometheus/haproxy_exporter.git","clone_url":"https://github.com/prometheus/haproxy_exporter.git","svn_url":"https://github.com/prometheus/haproxy_exporter","homepage":"","size":86,"stargazers_count":34,"watchers_count":34,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46"},"html":{"href":"https://github.com/prometheus/haproxy_exporter/pull/46"},"issue":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/46"},"comments":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/haproxy_exporter/statuses/0e520c18188cd576cada006e885865fce3fe1778"}}}}