{"action":"opened","number":395,"pull_request":{"url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395","id":137486551,"html_url":"https://github.com/mackerelio/mackerel-agent-plugins/pull/395","diff_url":"https://github.com/mackerelio/mackerel-agent-plugins/pull/395.diff","patch_url":"https://github.com/mackerelio/mackerel-agent-plugins/pull/395.patch","issue_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/395","number":395,"state":"open","locked":false,"title":"Add mackerel-plugin-json","user":{"login":"doublemarket","id":501949,"avatar_url":"https://avatars1.githubusercontent.com/u/501949?v=4","gravatar_id":"","url":"https://api.github.com/users/doublemarket","html_url":"https://github.com/doublemarket","followers_url":"https://api.github.com/users/doublemarket/followers","following_url":"https://api.github.com/users/doublemarket/following{/other_user}","gists_url":"https://api.github.com/users/doublemarket/gists{/gist_id}","starred_url":"https://api.github.com/users/doublemarket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doublemarket/subscriptions","organizations_url":"https://api.github.com/users/doublemarket/orgs","repos_url":"https://api.github.com/users/doublemarket/repos","events_url":"https://api.github.com/users/doublemarket/events{/privacy}","received_events_url":"https://api.github.com/users/doublemarket/received_events","type":"User","site_admin":true},"body":"This adds a plugin that gets metrics from a JSON. I wrote most of the code during the [Mackerel Plugin Hackathon #1 Tokyo](https://mackerelio.connpass.com/event/63087/).\r\n\r\nThe plugin doesn't use [go-mackerel-plugin](https://github.com/mackerelio/go-mackerel-plugin) or [go-mackerel-plugin-helper](https://github.com/mackerelio/go-mackerel-plugin). The reason is that the helpers require a graph definition for metrics while this plugin dynamically generates metrics from a JSON, which makes generating the definition hard.\r\n\r\nHowever, the plugin uses the similar naming scheme to the helpers since I was originally going to create this with either of the helpers.","created_at":"2017-08-24T15:42:10Z","updated_at":"2017-08-24T15:42:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395/commits","review_comments_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395/comments","review_comment_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/395/comments","statuses_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/statuses/29fe45088573462dbf24663413ae3f379388deb0","head":{"label":"doublemarket:json-plugin","ref":"json-plugin","sha":"29fe45088573462dbf24663413ae3f379388deb0","user":{"login":"doublemarket","id":501949,"avatar_url":"https://avatars1.githubusercontent.com/u/501949?v=4","gravatar_id":"","url":"https://api.github.com/users/doublemarket","html_url":"https://github.com/doublemarket","followers_url":"https://api.github.com/users/doublemarket/followers","following_url":"https://api.github.com/users/doublemarket/following{/other_user}","gists_url":"https://api.github.com/users/doublemarket/gists{/gist_id}","starred_url":"https://api.github.com/users/doublemarket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doublemarket/subscriptions","organizations_url":"https://api.github.com/users/doublemarket/orgs","repos_url":"https://api.github.com/users/doublemarket/repos","events_url":"https://api.github.com/users/doublemarket/events{/privacy}","received_events_url":"https://api.github.com/users/doublemarket/received_events","type":"User","site_admin":true},"repo":{"id":101309983,"name":"mackerel-agent-plugins","full_name":"doublemarket/mackerel-agent-plugins","owner":{"login":"doublemarket","id":501949,"avatar_url":"https://avatars1.githubusercontent.com/u/501949?v=4","gravatar_id":"","url":"https://api.github.com/users/doublemarket","html_url":"https://github.com/doublemarket","followers_url":"https://api.github.com/users/doublemarket/followers","following_url":"https://api.github.com/users/doublemarket/following{/other_user}","gists_url":"https://api.github.com/users/doublemarket/gists{/gist_id}","starred_url":"https://api.github.com/users/doublemarket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doublemarket/subscriptions","organizations_url":"https://api.github.com/users/doublemarket/orgs","repos_url":"https://api.github.com/users/doublemarket/repos","events_url":"https://api.github.com/users/doublemarket/events{/privacy}","received_events_url":"https://api.github.com/users/doublemarket/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/doublemarket/mackerel-agent-plugins","description":"Plugins for mackerel-agent","fork":true,"url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins","forks_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/forks","keys_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/teams","hooks_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/hooks","issue_events_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/events","assignees_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/tags","blobs_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/languages","stargazers_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/stargazers","contributors_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/contributors","subscribers_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/subscribers","subscription_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/subscription","commits_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/merges","archive_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/downloads","issues_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/labels{/name}","releases_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/doublemarket/mackerel-agent-plugins/deployments","created_at":"2017-08-24T15:24:34Z","updated_at":"2017-08-24T15:24:36Z","pushed_at":"2017-08-24T15:26:05Z","git_url":"git://github.com/doublemarket/mackerel-agent-plugins.git","ssh_url":"git@github.com:doublemarket/mackerel-agent-plugins.git","clone_url":"https://github.com/doublemarket/mackerel-agent-plugins.git","svn_url":"https://github.com/doublemarket/mackerel-agent-plugins","homepage":"https://mackerel.io","size":3428,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"mackerelio:master","ref":"master","sha":"eda8ece90da224ccf1c6f67bb5d6b6277f3d7604","user":{"login":"mackerelio","id":6637336,"avatar_url":"https://avatars0.githubusercontent.com/u/6637336?v=4","gravatar_id":"","url":"https://api.github.com/users/mackerelio","html_url":"https://github.com/mackerelio","followers_url":"https://api.github.com/users/mackerelio/followers","following_url":"https://api.github.com/users/mackerelio/following{/other_user}","gists_url":"https://api.github.com/users/mackerelio/gists{/gist_id}","starred_url":"https://api.github.com/users/mackerelio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mackerelio/subscriptions","organizations_url":"https://api.github.com/users/mackerelio/orgs","repos_url":"https://api.github.com/users/mackerelio/repos","events_url":"https://api.github.com/users/mackerelio/events{/privacy}","received_events_url":"https://api.github.com/users/mackerelio/received_events","type":"Organization","site_admin":false},"repo":{"id":23221080,"name":"mackerel-agent-plugins","full_name":"mackerelio/mackerel-agent-plugins","owner":{"login":"mackerelio","id":6637336,"avatar_url":"https://avatars0.githubusercontent.com/u/6637336?v=4","gravatar_id":"","url":"https://api.github.com/users/mackerelio","html_url":"https://github.com/mackerelio","followers_url":"https://api.github.com/users/mackerelio/followers","following_url":"https://api.github.com/users/mackerelio/following{/other_user}","gists_url":"https://api.github.com/users/mackerelio/gists{/gist_id}","starred_url":"https://api.github.com/users/mackerelio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mackerelio/subscriptions","organizations_url":"https://api.github.com/users/mackerelio/orgs","repos_url":"https://api.github.com/users/mackerelio/repos","events_url":"https://api.github.com/users/mackerelio/events{/privacy}","received_events_url":"https://api.github.com/users/mackerelio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mackerelio/mackerel-agent-plugins","description":"Plugins for mackerel-agent","fork":false,"url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins","forks_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/forks","keys_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/teams","hooks_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/hooks","issue_events_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/events","assignees_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/tags","blobs_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/languages","stargazers_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/stargazers","contributors_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/contributors","subscribers_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/subscribers","subscription_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/subscription","commits_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/merges","archive_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/downloads","issues_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/labels{/name}","releases_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/deployments","created_at":"2014-08-22T10:03:01Z","updated_at":"2017-08-23T01:38:37Z","pushed_at":"2017-08-24T11:25:14Z","git_url":"git://github.com/mackerelio/mackerel-agent-plugins.git","ssh_url":"git@github.com:mackerelio/mackerel-agent-plugins.git","clone_url":"https://github.com/mackerelio/mackerel-agent-plugins.git","svn_url":"https://github.com/mackerelio/mackerel-agent-plugins","homepage":"https://mackerel.io","size":3428,"stargazers_count":117,"watchers_count":117,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":8,"forks":87,"open_issues":8,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395"},"html":{"href":"https://github.com/mackerelio/mackerel-agent-plugins/pull/395"},"issue":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/395"},"comments":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/issues/395/comments"},"review_comments":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395/comments"},"review_comment":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/pulls/395/commits"},"statuses":{"href":"https://api.github.com/repos/mackerelio/mackerel-agent-plugins/statuses/29fe45088573462dbf24663413ae3f379388deb0"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":373,"deletions":0,"changed_files":7}}
{"actor":{"display_login":"doublemarket"}}