{"action":"closed","number":48,"pull_request":{"url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48","id":46906748,"html_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/48","diff_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/48.diff","patch_url":"https://github.com/jmxtrans/jmxtrans-agent/pull/48.patch","issue_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/48","number":48,"state":"closed","locked":false,"title":"Add support for dynamic agent attachement","user":{"login":"pingtimeout","id":1159578,"avatar_url":"https://avatars.githubusercontent.com/u/1159578?v=3","gravatar_id":"","url":"https://api.github.com/users/pingtimeout","html_url":"https://github.com/pingtimeout","followers_url":"https://api.github.com/users/pingtimeout/followers","following_url":"https://api.github.com/users/pingtimeout/following{/other_user}","gists_url":"https://api.github.com/users/pingtimeout/gists{/gist_id}","starred_url":"https://api.github.com/users/pingtimeout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingtimeout/subscriptions","organizations_url":"https://api.github.com/users/pingtimeout/orgs","repos_url":"https://api.github.com/users/pingtimeout/repos","events_url":"https://api.github.com/users/pingtimeout/events{/privacy}","received_events_url":"https://api.github.com/users/pingtimeout/received_events","type":"User","site_admin":false},"body":"With an \"agentmain\" method, it is possible to attach the agent to a running JVM.  This PR adds a new class that connects to an existing JVM and attach the agent after the fact.\r\n\r\nTo use the agent, the absolute paths to both the agent JAR and its configuration must be passed to the launcher, along with the target JVM PID.\r\n\r\nExample, assuming the agent is in `/tmp/`, the configuration file is `/tmp/sample-config.xml` and the target JVM has PID `1234`, run the following:\r\n\r\n```sh\r\njava \\\r\n  -cp $JAVA_HOME/lib/tools.jar:/tmp/jmxtrans-agent-1.1.1-SNAPSHOT.jar \\\r\n  org.jmxtrans.agent.DynamicallyAgentAttacher \\\r\n  /tmp/jmxtrans-agent-1.1.1-SNAPSHOT.jar \\\r\n  1234 \\\r\n  /tmp/sample-config.xml\r\n```","created_at":"2015-10-06T14:04:43Z","updated_at":"2015-10-06T14:48:19Z","closed_at":"2015-10-06T14:48:19Z","merged_at":"2015-10-06T14:48:19Z","merge_commit_sha":"776ebf293d269d60fd8b7ed9c78a3082acea620e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48/commits","review_comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48/comments","review_comment_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/48/comments","statuses_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/1325546dbe03d4bc78d159b5416d4ec0948c97eb","head":{"label":"pingtimeout:dynamic-attachement","ref":"dynamic-attachement","sha":"1325546dbe03d4bc78d159b5416d4ec0948c97eb","user":{"login":"pingtimeout","id":1159578,"avatar_url":"https://avatars.githubusercontent.com/u/1159578?v=3","gravatar_id":"","url":"https://api.github.com/users/pingtimeout","html_url":"https://github.com/pingtimeout","followers_url":"https://api.github.com/users/pingtimeout/followers","following_url":"https://api.github.com/users/pingtimeout/following{/other_user}","gists_url":"https://api.github.com/users/pingtimeout/gists{/gist_id}","starred_url":"https://api.github.com/users/pingtimeout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingtimeout/subscriptions","organizations_url":"https://api.github.com/users/pingtimeout/orgs","repos_url":"https://api.github.com/users/pingtimeout/repos","events_url":"https://api.github.com/users/pingtimeout/events{/privacy}","received_events_url":"https://api.github.com/users/pingtimeout/received_events","type":"User","site_admin":false},"repo":{"id":43753010,"name":"jmxtrans-agent","full_name":"pingtimeout/jmxtrans-agent","owner":{"login":"pingtimeout","id":1159578,"avatar_url":"https://avatars.githubusercontent.com/u/1159578?v=3","gravatar_id":"","url":"https://api.github.com/users/pingtimeout","html_url":"https://github.com/pingtimeout","followers_url":"https://api.github.com/users/pingtimeout/followers","following_url":"https://api.github.com/users/pingtimeout/following{/other_user}","gists_url":"https://api.github.com/users/pingtimeout/gists{/gist_id}","starred_url":"https://api.github.com/users/pingtimeout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingtimeout/subscriptions","organizations_url":"https://api.github.com/users/pingtimeout/orgs","repos_url":"https://api.github.com/users/pingtimeout/repos","events_url":"https://api.github.com/users/pingtimeout/events{/privacy}","received_events_url":"https://api.github.com/users/pingtimeout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pingtimeout/jmxtrans-agent","description":"Java Agent based JMX metrics exporter.","fork":true,"url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent","forks_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/forks","keys_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/teams","hooks_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/hooks","issue_events_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/issues/events{/number}","events_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/events","assignees_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/assignees{/user}","branches_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/branches{/branch}","tags_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/tags","blobs_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/languages","stargazers_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/stargazers","contributors_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/contributors","subscribers_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/subscribers","subscription_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/subscription","commits_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/contents/{+path}","compare_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/merges","archive_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/downloads","issues_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/issues{/number}","pulls_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/labels{/name}","releases_url":"https://api.github.com/repos/pingtimeout/jmxtrans-agent/releases{/id}","created_at":"2015-10-06T13:39:59Z","updated_at":"2015-10-06T13:40:00Z","pushed_at":"2015-10-06T14:02:02Z","git_url":"git://github.com/pingtimeout/jmxtrans-agent.git","ssh_url":"git@github.com:pingtimeout/jmxtrans-agent.git","clone_url":"https://github.com/pingtimeout/jmxtrans-agent.git","svn_url":"https://github.com/pingtimeout/jmxtrans-agent","homepage":null,"size":600,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jmxtrans:master","ref":"master","sha":"c3daeb4a36c9dbe0c905bd61d0f8188f3900ab23","user":{"login":"jmxtrans","id":3198433,"avatar_url":"https://avatars.githubusercontent.com/u/3198433?v=3","gravatar_id":"","url":"https://api.github.com/users/jmxtrans","html_url":"https://github.com/jmxtrans","followers_url":"https://api.github.com/users/jmxtrans/followers","following_url":"https://api.github.com/users/jmxtrans/following{/other_user}","gists_url":"https://api.github.com/users/jmxtrans/gists{/gist_id}","starred_url":"https://api.github.com/users/jmxtrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmxtrans/subscriptions","organizations_url":"https://api.github.com/users/jmxtrans/orgs","repos_url":"https://api.github.com/users/jmxtrans/repos","events_url":"https://api.github.com/users/jmxtrans/events{/privacy}","received_events_url":"https://api.github.com/users/jmxtrans/received_events","type":"Organization","site_admin":false},"repo":{"id":9603892,"name":"jmxtrans-agent","full_name":"jmxtrans/jmxtrans-agent","owner":{"login":"jmxtrans","id":3198433,"avatar_url":"https://avatars.githubusercontent.com/u/3198433?v=3","gravatar_id":"","url":"https://api.github.com/users/jmxtrans","html_url":"https://github.com/jmxtrans","followers_url":"https://api.github.com/users/jmxtrans/followers","following_url":"https://api.github.com/users/jmxtrans/following{/other_user}","gists_url":"https://api.github.com/users/jmxtrans/gists{/gist_id}","starred_url":"https://api.github.com/users/jmxtrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmxtrans/subscriptions","organizations_url":"https://api.github.com/users/jmxtrans/orgs","repos_url":"https://api.github.com/users/jmxtrans/repos","events_url":"https://api.github.com/users/jmxtrans/events{/privacy}","received_events_url":"https://api.github.com/users/jmxtrans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jmxtrans/jmxtrans-agent","description":"Java Agent based JMX metrics exporter.","fork":false,"url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent","forks_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/forks","keys_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/teams","hooks_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/hooks","issue_events_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/events{/number}","events_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/events","assignees_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/assignees{/user}","branches_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/branches{/branch}","tags_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/tags","blobs_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/languages","stargazers_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/stargazers","contributors_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/contributors","subscribers_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/subscribers","subscription_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/subscription","commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/contents/{+path}","compare_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/merges","archive_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/downloads","issues_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues{/number}","pulls_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/labels{/name}","releases_url":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/releases{/id}","created_at":"2013-04-22T16:49:49Z","updated_at":"2015-09-18T05:48:09Z","pushed_at":"2015-10-06T14:48:19Z","git_url":"git://github.com/jmxtrans/jmxtrans-agent.git","ssh_url":"git@github.com:jmxtrans/jmxtrans-agent.git","clone_url":"https://github.com/jmxtrans/jmxtrans-agent.git","svn_url":"https://github.com/jmxtrans/jmxtrans-agent","homepage":null,"size":1167,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":28,"mirror_url":null,"open_issues_count":13,"forks":28,"open_issues":13,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48"},"html":{"href":"https://github.com/jmxtrans/jmxtrans-agent/pull/48"},"issue":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/48"},"comments":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/jmxtrans/jmxtrans-agent/statuses/1325546dbe03d4bc78d159b5416d4ec0948c97eb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cyrille-leclerc","id":459691,"avatar_url":"https://avatars.githubusercontent.com/u/459691?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrille-leclerc","html_url":"https://github.com/cyrille-leclerc","followers_url":"https://api.github.com/users/cyrille-leclerc/followers","following_url":"https://api.github.com/users/cyrille-leclerc/following{/other_user}","gists_url":"https://api.github.com/users/cyrille-leclerc/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrille-leclerc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrille-leclerc/subscriptions","organizations_url":"https://api.github.com/users/cyrille-leclerc/orgs","repos_url":"https://api.github.com/users/cyrille-leclerc/repos","events_url":"https://api.github.com/users/cyrille-leclerc/events{/privacy}","received_events_url":"https://api.github.com/users/cyrille-leclerc/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":58,"deletions":0,"changed_files":3}}