{"action":"created","comment":{"url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/comments/26118874","id":26118874,"diff_hunk":"@@ -0,0 +1,78 @@\n+#!/usr/bin/env ruby\n+\n+# Ensure your instrument_server process runs with these environment variables set,\n+# or replace with your own.\n+\n+MYSQL_HOST              = ENV[\"MYSQL_HOST\"]","path":"examples/mysql/mysql_status.rb","position":6,"original_position":6,"commit_id":"76882ec095921e4d0882fef6f60a8593d27f5a33","original_commit_id":"76882ec095921e4d0882fef6f60a8593d27f5a33","user":{"login":"netshade","id":3809,"avatar_url":"https://avatars.githubusercontent.com/u/3809?v=3","gravatar_id":"","url":"https://api.github.com/users/netshade","html_url":"https://github.com/netshade","followers_url":"https://api.github.com/users/netshade/followers","following_url":"https://api.github.com/users/netshade/following{/other_user}","gists_url":"https://api.github.com/users/netshade/gists{/gist_id}","starred_url":"https://api.github.com/users/netshade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netshade/subscriptions","organizations_url":"https://api.github.com/users/netshade/orgs","repos_url":"https://api.github.com/users/netshade/repos","events_url":"https://api.github.com/users/netshade/events{/privacy}","received_events_url":"https://api.github.com/users/netshade/received_events","type":"User","site_admin":false},"body":"Good point, will do","created_at":"2015-03-10T13:01:59Z","updated_at":"2015-03-10T13:01:59Z","html_url":"https://github.com/expectedbehavior/instrumental_tools/pull/21#discussion_r26118874","pull_request_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/comments/26118874"},"html":{"href":"https://github.com/expectedbehavior/instrumental_tools/pull/21#discussion_r26118874"},"pull_request":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21","id":30818977,"html_url":"https://github.com/expectedbehavior/instrumental_tools/pull/21","diff_url":"https://github.com/expectedbehavior/instrumental_tools/pull/21.diff","patch_url":"https://github.com/expectedbehavior/instrumental_tools/pull/21.patch","issue_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/21","number":21,"state":"open","locked":false,"title":"[WIP] instrument_server update","user":{"login":"netshade","id":3809,"avatar_url":"https://avatars.githubusercontent.com/u/3809?v=3","gravatar_id":"","url":"https://api.github.com/users/netshade","html_url":"https://github.com/netshade","followers_url":"https://api.github.com/users/netshade/followers","following_url":"https://api.github.com/users/netshade/following{/other_user}","gists_url":"https://api.github.com/users/netshade/gists{/gist_id}","starred_url":"https://api.github.com/users/netshade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netshade/subscriptions","organizations_url":"https://api.github.com/users/netshade/orgs","repos_url":"https://api.github.com/users/netshade/repos","events_url":"https://api.github.com/users/netshade/events{/privacy}","received_events_url":"https://api.github.com/users/netshade/received_events","type":"User","site_admin":false},"body":"Some long required love for `instrument_server`. Summary of changes:\r\n\r\n* Remove `json` dependency, which should lower the number of server dependencies required to install the gem (`json` inadvertently requires the `ruby-dev` package on Ubuntu, which installs the `build-essential` package, which seems like overkill for what we're doing here)\r\n* Remove the requirement that an API key be provided when issuing `instrument_server restart` or `instrument_server stop`.\r\n* Allow configuring the reporting interval, and change the default interval to 30s.\r\n* Change the default location of the PID and log files to `$HOME/the_file`. The previous location, `/tmp/`, could cause the `PID` to be cleaned out from underneath the process.\r\n* Allow the PID location and log file location to be specified at startup.\r\n* Try to ensure the process has started successfully before detaching, and fail loudly if it has not.\r\n* Output the number of metrics sent at each reporting interval.\r\n* Add a slim framework for writing custom metric scripts ([CUSTOM_METRICS.md](https://github.com/expectedbehavior/instrumental_tools/blob/increase-process-durability/CUSTOM_METRICS.md)), as well as some initial examples of how to use it. Documentation as well.\r\n* Set the required Ruby version to 1.9.\r\n* Monolithic `instrument_server` script broken apart into several files to ease w/ maintenance\r\n\r\nMarked as [WIP] because this many changes deserves some discussion, as well as:\r\n\r\n- [ ] Test custom metrics scripts to verify desirable behavior\r\n- [ ] Add better installation instructions for various OS flavors\r\n- [ ] Add other examples as deemed necessary\r\n- [ ] Rotate log on user signal\r\n","created_at":"2015-03-10T02:55:32Z","updated_at":"2015-03-10T13:01:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d85e883f1ed03ba7428e90458255c050f7d091e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21/commits","review_comments_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21/comments","review_comment_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/21/comments","statuses_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/statuses/76882ec095921e4d0882fef6f60a8593d27f5a33","head":{"label":"expectedbehavior:increase-process-durability","ref":"increase-process-durability","sha":"76882ec095921e4d0882fef6f60a8593d27f5a33","user":{"login":"expectedbehavior","id":62844,"avatar_url":"https://avatars.githubusercontent.com/u/62844?v=3","gravatar_id":"","url":"https://api.github.com/users/expectedbehavior","html_url":"https://github.com/expectedbehavior","followers_url":"https://api.github.com/users/expectedbehavior/followers","following_url":"https://api.github.com/users/expectedbehavior/following{/other_user}","gists_url":"https://api.github.com/users/expectedbehavior/gists{/gist_id}","starred_url":"https://api.github.com/users/expectedbehavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expectedbehavior/subscriptions","organizations_url":"https://api.github.com/users/expectedbehavior/orgs","repos_url":"https://api.github.com/users/expectedbehavior/repos","events_url":"https://api.github.com/users/expectedbehavior/events{/privacy}","received_events_url":"https://api.github.com/users/expectedbehavior/received_events","type":"Organization","site_admin":false},"repo":{"id":2781646,"name":"instrumental_tools","full_name":"expectedbehavior/instrumental_tools","owner":{"login":"expectedbehavior","id":62844,"avatar_url":"https://avatars.githubusercontent.com/u/62844?v=3","gravatar_id":"","url":"https://api.github.com/users/expectedbehavior","html_url":"https://github.com/expectedbehavior","followers_url":"https://api.github.com/users/expectedbehavior/followers","following_url":"https://api.github.com/users/expectedbehavior/following{/other_user}","gists_url":"https://api.github.com/users/expectedbehavior/gists{/gist_id}","starred_url":"https://api.github.com/users/expectedbehavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expectedbehavior/subscriptions","organizations_url":"https://api.github.com/users/expectedbehavior/orgs","repos_url":"https://api.github.com/users/expectedbehavior/repos","events_url":"https://api.github.com/users/expectedbehavior/events{/privacy}","received_events_url":"https://api.github.com/users/expectedbehavior/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/expectedbehavior/instrumental_tools","description":"Command line tools to use with Instrumental","fork":false,"url":"https://api.github.com/repos/expectedbehavior/instrumental_tools","forks_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/forks","keys_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/teams","hooks_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/hooks","issue_events_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/events{/number}","events_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/events","assignees_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/assignees{/user}","branches_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/branches{/branch}","tags_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/tags","blobs_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/languages","stargazers_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/stargazers","contributors_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/contributors","subscribers_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/subscribers","subscription_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/subscription","commits_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/contents/{+path}","compare_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/merges","archive_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/downloads","issues_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues{/number}","pulls_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/labels{/name}","releases_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/releases{/id}","created_at":"2011-11-15T16:52:10Z","updated_at":"2014-12-14T20:54:20Z","pushed_at":"2015-03-10T04:57:00Z","git_url":"git://github.com/expectedbehavior/instrumental_tools.git","ssh_url":"git@github.com:expectedbehavior/instrumental_tools.git","clone_url":"https://github.com/expectedbehavior/instrumental_tools.git","svn_url":"https://github.com/expectedbehavior/instrumental_tools","homepage":"http://www.instrumentalapp.com/","size":273,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":4,"default_branch":"master"}},"base":{"label":"expectedbehavior:master","ref":"master","sha":"1b9acfec48fa6dcde2e754e9ba58299369d50e5f","user":{"login":"expectedbehavior","id":62844,"avatar_url":"https://avatars.githubusercontent.com/u/62844?v=3","gravatar_id":"","url":"https://api.github.com/users/expectedbehavior","html_url":"https://github.com/expectedbehavior","followers_url":"https://api.github.com/users/expectedbehavior/followers","following_url":"https://api.github.com/users/expectedbehavior/following{/other_user}","gists_url":"https://api.github.com/users/expectedbehavior/gists{/gist_id}","starred_url":"https://api.github.com/users/expectedbehavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expectedbehavior/subscriptions","organizations_url":"https://api.github.com/users/expectedbehavior/orgs","repos_url":"https://api.github.com/users/expectedbehavior/repos","events_url":"https://api.github.com/users/expectedbehavior/events{/privacy}","received_events_url":"https://api.github.com/users/expectedbehavior/received_events","type":"Organization","site_admin":false},"repo":{"id":2781646,"name":"instrumental_tools","full_name":"expectedbehavior/instrumental_tools","owner":{"login":"expectedbehavior","id":62844,"avatar_url":"https://avatars.githubusercontent.com/u/62844?v=3","gravatar_id":"","url":"https://api.github.com/users/expectedbehavior","html_url":"https://github.com/expectedbehavior","followers_url":"https://api.github.com/users/expectedbehavior/followers","following_url":"https://api.github.com/users/expectedbehavior/following{/other_user}","gists_url":"https://api.github.com/users/expectedbehavior/gists{/gist_id}","starred_url":"https://api.github.com/users/expectedbehavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expectedbehavior/subscriptions","organizations_url":"https://api.github.com/users/expectedbehavior/orgs","repos_url":"https://api.github.com/users/expectedbehavior/repos","events_url":"https://api.github.com/users/expectedbehavior/events{/privacy}","received_events_url":"https://api.github.com/users/expectedbehavior/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/expectedbehavior/instrumental_tools","description":"Command line tools to use with Instrumental","fork":false,"url":"https://api.github.com/repos/expectedbehavior/instrumental_tools","forks_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/forks","keys_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/teams","hooks_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/hooks","issue_events_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/events{/number}","events_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/events","assignees_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/assignees{/user}","branches_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/branches{/branch}","tags_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/tags","blobs_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/languages","stargazers_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/stargazers","contributors_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/contributors","subscribers_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/subscribers","subscription_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/subscription","commits_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/contents/{+path}","compare_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/merges","archive_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/downloads","issues_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues{/number}","pulls_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/labels{/name}","releases_url":"https://api.github.com/repos/expectedbehavior/instrumental_tools/releases{/id}","created_at":"2011-11-15T16:52:10Z","updated_at":"2014-12-14T20:54:20Z","pushed_at":"2015-03-10T04:57:00Z","git_url":"git://github.com/expectedbehavior/instrumental_tools.git","ssh_url":"git@github.com:expectedbehavior/instrumental_tools.git","clone_url":"https://github.com/expectedbehavior/instrumental_tools.git","svn_url":"https://github.com/expectedbehavior/instrumental_tools","homepage":"http://www.instrumentalapp.com/","size":273,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21"},"html":{"href":"https://github.com/expectedbehavior/instrumental_tools/pull/21"},"issue":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/21"},"comments":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/expectedbehavior/instrumental_tools/statuses/76882ec095921e4d0882fef6f60a8593d27f5a33"}}}}