{"action":"created","comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/45340599","id":45340599,"diff_hunk":"@@ -36,15 +38,19 @@ import (\n \t\"github.com/cockroachdb/cockroach/util\"\n \t\"github.com/cockroachdb/cockroach/util/log\"\n \t\"github.com/cockroachdb/cockroach/util/retry\"\n+\t\"github.com/cockroachdb/cockroach/util/stop\"\n )\n \n-var outputDir = flag.String(\"dir\", \".\", \"Directory in which to output the status logs to.\")\n-var interval = flag.Duration(\"interval\", 10*time.Second, \"Interval in which to poll the cluster's status.\")\n-var addr = flag.String(\"addr\", \":26257\", \"The host:port of the cockroach cluster.\")\n+const (\n+\t// urlPath is the http path of the status server on each node.\n+\turlPath = \"_status/nodes\"\n+)\n+\n+var interval = flag.Duration(\"interval\", 10*time.Second, \"Interval in which to poll each services's status.\")\n+var addrs = flag.String(\"addrs\", \":26257\", \"Comma-separated list of host:port status endpoints to monitor.\")","path":"cmd/monitor/main.go","position":31,"original_position":31,"commit_id":"96605433ef705f55d27be87b5514f0e04d7b5ee4","original_commit_id":"96605433ef705f55d27be87b5514f0e04d7b5ee4","user":{"login":"mberhault","id":5901480,"avatar_url":"https://avatars.githubusercontent.com/u/5901480?v=3","gravatar_id":"","url":"https://api.github.com/users/mberhault","html_url":"https://github.com/mberhault","followers_url":"https://api.github.com/users/mberhault/followers","following_url":"https://api.github.com/users/mberhault/following{/other_user}","gists_url":"https://api.github.com/users/mberhault/gists{/gist_id}","starred_url":"https://api.github.com/users/mberhault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mberhault/subscriptions","organizations_url":"https://api.github.com/users/mberhault/orgs","repos_url":"https://api.github.com/users/mberhault/repos","events_url":"https://api.github.com/users/mberhault/events{/privacy}","received_events_url":"https://api.github.com/users/mberhault/received_events","type":"User","site_admin":false},"body":"just \"host:port to monitor\". including \"status endpoints\" in the message makes it sounds like I should pass host:port/url","created_at":"2015-11-19T13:38:10Z","updated_at":"2015-11-19T13:38:10Z","html_url":"https://github.com/cockroachdb/cockroach/pull/3168#discussion_r45340599","pull_request_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168","_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/45340599"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/3168#discussion_r45340599"},"pull_request":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168"}}},"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168","id":51165601,"html_url":"https://github.com/cockroachdb/cockroach/pull/3168","diff_url":"https://github.com/cockroachdb/cockroach/pull/3168.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/3168.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3168","number":3168,"state":"open","locked":false,"title":"Status Monitor can monitor Multiple Servers","user":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"body":"Status monitor tool now accepts a comma-delimited list of addresses on the\r\ncommand line, and will monitor all given servers in parallel.\r\n\r\nThe output log has been removed; it is not being used and is not particularly\r\nparseable at the current time.\r\n\r\nThe next step is to modify the cockroach server to expose a more general \"/Health\"\r\nendpoint, which will indicate only if the individual node is running.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/3168)\n<!-- Reviewable:end -->\n","created_at":"2015-11-19T00:50:16Z","updated_at":"2015-11-19T13:38:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be7f9b585df850bb00a34ab6e0bb2445266079a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/3168/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/96605433ef705f55d27be87b5514f0e04d7b5ee4","head":{"label":"mrtracy:mtracy/status_monitor_extend","ref":"mtracy/status_monitor_extend","sha":"96605433ef705f55d27be87b5514f0e04d7b5ee4","user":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"repo":{"id":39856388,"name":"cockroach","full_name":"mrtracy/cockroach","owner":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrtracy/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":true,"url":"https://api.github.com/repos/mrtracy/cockroach","forks_url":"https://api.github.com/repos/mrtracy/cockroach/forks","keys_url":"https://api.github.com/repos/mrtracy/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrtracy/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrtracy/cockroach/teams","hooks_url":"https://api.github.com/repos/mrtracy/cockroach/hooks","issue_events_url":"https://api.github.com/repos/mrtracy/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/mrtracy/cockroach/events","assignees_url":"https://api.github.com/repos/mrtracy/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/mrtracy/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/mrtracy/cockroach/tags","blobs_url":"https://api.github.com/repos/mrtracy/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrtracy/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrtracy/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrtracy/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrtracy/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/mrtracy/cockroach/languages","stargazers_url":"https://api.github.com/repos/mrtracy/cockroach/stargazers","contributors_url":"https://api.github.com/repos/mrtracy/cockroach/contributors","subscribers_url":"https://api.github.com/repos/mrtracy/cockroach/subscribers","subscription_url":"https://api.github.com/repos/mrtracy/cockroach/subscription","commits_url":"https://api.github.com/repos/mrtracy/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrtracy/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrtracy/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrtracy/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrtracy/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/mrtracy/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrtracy/cockroach/merges","archive_url":"https://api.github.com/repos/mrtracy/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrtracy/cockroach/downloads","issues_url":"https://api.github.com/repos/mrtracy/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/mrtracy/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/mrtracy/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/mrtracy/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrtracy/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/mrtracy/cockroach/releases{/id}","created_at":"2015-07-28T20:33:41Z","updated_at":"2015-07-28T20:33:42Z","pushed_at":"2015-11-19T00:30:28Z","git_url":"git://github.com/mrtracy/cockroach.git","ssh_url":"git@github.com:mrtracy/cockroach.git","clone_url":"https://github.com/mrtracy/cockroach.git","svn_url":"https://github.com/mrtracy/cockroach","homepage":null,"size":45996,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"623d09252c5e3238b8951a6d09e7dd25905f77f1","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":16563587,"name":"cockroach","full_name":"cockroachdb/cockroach","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroach","forks_url":"https://api.github.com/repos/cockroachdb/cockroach/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroach/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroach/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroach/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroach/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroach/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroach/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroach/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroach/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroach/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroach/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroach/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroach/releases{/id}","created_at":"2014-02-06T00:18:47Z","updated_at":"2015-11-19T12:33:43Z","pushed_at":"2015-11-19T12:34:04Z","git_url":"git://github.com/cockroachdb/cockroach.git","ssh_url":"git@github.com:cockroachdb/cockroach.git","clone_url":"https://github.com/cockroachdb/cockroach.git","svn_url":"https://github.com/cockroachdb/cockroach","homepage":null,"size":51813,"stargazers_count":5713,"watchers_count":5713,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":479,"mirror_url":null,"open_issues_count":214,"forks":479,"open_issues":214,"watchers":5713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/3168"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/3168"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/3168/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/3168/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/96605433ef705f55d27be87b5514f0e04d7b5ee4"}}}}