{"action":"created","comment":{"url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/comments/30227046","id":30227046,"diff_hunk":"@@ -0,0 +1,168 @@\n+= #Metrics-Wizard\n+\n+image::https://badges.gitter.im/Join%20Chat.svg[link=\"https://gitter.im/lookout/metrics-wizard\"]\n+image:https://travis-ci.org/lookout/metrics-wizard.svg?branch=master[\"Build Status\",link=\"https://travis-ci.org/lookout/metrics-wizard\"]\n+\n+**Who, what, where and when.**\n+\n+---\n+\n+== Important Links\n+\n+* link:https://github.com/lookout/metrics-wizard[Source code]\n+* link:https://github.com/lookout/metrics-wizard/issues[Issue Tracker]\n+\n+== Internals Links\n+\n+* <<hacking.ad#,Hacking>>\n+* <<workflow.ad#,WorkFlow>>\n+\n+== The Problem\n+\n+Most of the applications expose their metrics via JMX. Usually an external agent connects to the\n+JMX port and gathers all the information.\n+\n+As discussed in this link:http://hackers.lookout.com/2015/01/cassandra-monitoring/[article]\n+there are issues with using an external JMX gathering tool:\n+\n+* it has to poll the application's JMX agent\n+* authenticate to avoid exposing vulnerabilities\n+* redundancy issues if reporting tool dies\n+\n+== The Solution\n+\n+* Metrics Wizard is a Java agent for aggregating and reporting metrics from any JVM process.\n+\n+* It detects the metrics of type Long, Integer, Double, or Float and periodically reports it\n+  to the server via UDP or HTTP transport. Such an approach means no changes required to the\n+  existing application code.\n+\n+* The Metrics-Wizard will use our forked metrics-datadog reporter for reporting these published\n+  metrics to server.\n+\n+== Design Thoughts\n+\n+=== Quick Primer\n+\n+* Java Management Extensions (aka JMX) is a facility that allows for remote clients or\n+  local agents to manage and/or monitor applications running in any JVM process.\n+  JMX is an simple way to expose some of the key inner-workings of your application\n+  in a standardized way.\n+\n+* This application management and/or monitoring is done via MBeans. Managed Beans\n+  (aka MBean) is a managed Java object. MBean exposes a management interface\n+  that consists of attributes (i.e. metrics), operations, notifications, etc.\n+\n+* For each end-point (i.e. metric, statistic, gauge, meter, etc), application creates\n+  a MBean and registers it with JMX infrastructure (i.e. MBeanServer)\n+\n+=== Configuration\n+\n+* Define a threshold for a metric which would create a “monitor”\n+\n+* Define and configure a reporter for the agent to use with a fully qualified class name\n+\n+[source,yaml]\n+.metrics-wizard.yml\n+----\n+Mbean-poll-interval: 5 # in seconds\n+thresholds:\n+    metric-name-1: threshold-value-1\n+    metric-name-2: threshold-value-2\n+reporter:\n+    type: metricswizard.reporter.UdpReporter\n+    host: 192.168.1.1\n+    port: 1234\n+    interval: 10 # in seconds\n+----\n+\n+=== Metrics-wizard, the agent\n+\n+* In the premain routine, agent scans all the extant MBeans (metrics) from MBeanServer.\n+\n+* When an MBean is registered or unregistered in the MBeanServer, a MBeanServerNotification\n+  Notification is emitted. The agent learns about these by registering a listener to\n+  \"MBeanServerDelegate\" MBean.\n+\n+* If MBean generates notification (at run-time MBeanServer exposes this capability in MBean's\n+  MBeanInfo object), then agent registers a NotificationListener to receive notifications from\n+  that MBean.\n+\n+* If MBean does no generate notifications, then agent polls the MBean periodically and\n+  detect attribute changes.\n+\n+* Once metrics are detected, they are stored in\n+link:https://dropwizard.github.io/metrics/3.1.0/getting-started/#the-registry[Dropwizard MetricRegistry].\n+\n+=== Reporting\n+\n+* The Metrics-Wizard will use link:https://github.com/lookout/metrics-datadog[metrics-datadog]","path":"src/asciidoc/index.ad","position":99,"original_position":99,"commit_id":"3cb5dc8f70f8ae8f842315c54db7db7ecc7899bd","original_commit_id":"3cb5dc8f70f8ae8f842315c54db7db7ecc7899bd","user":{"login":"GiriDandu","id":4194632,"avatar_url":"https://avatars.githubusercontent.com/u/4194632?v=3","gravatar_id":"","url":"https://api.github.com/users/GiriDandu","html_url":"https://github.com/GiriDandu","followers_url":"https://api.github.com/users/GiriDandu/followers","following_url":"https://api.github.com/users/GiriDandu/following{/other_user}","gists_url":"https://api.github.com/users/GiriDandu/gists{/gist_id}","starred_url":"https://api.github.com/users/GiriDandu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GiriDandu/subscriptions","organizations_url":"https://api.github.com/users/GiriDandu/orgs","repos_url":"https://api.github.com/users/GiriDandu/repos","events_url":"https://api.github.com/users/GiriDandu/events{/privacy}","received_events_url":"https://api.github.com/users/GiriDandu/received_events","type":"User","site_admin":false},"body":"Any configured reporter instead of just datadog reporter","created_at":"2015-05-13T12:54:42Z","updated_at":"2015-05-13T12:54:42Z","html_url":"https://github.com/lookout/metrics-wizard/pull/2#discussion_r30227046","pull_request_url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/comments/30227046"},"html":{"href":"https://github.com/lookout/metrics-wizard/pull/2#discussion_r30227046"},"pull_request":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2","id":35319391,"html_url":"https://github.com/lookout/metrics-wizard/pull/2","diff_url":"https://github.com/lookout/metrics-wizard/pull/2.diff","patch_url":"https://github.com/lookout/metrics-wizard/pull/2.patch","issue_url":"https://api.github.com/repos/lookout/metrics-wizard/issues/2","number":2,"state":"open","locked":false,"title":"Added initial docs with directory, classes, diagram, and workflow","user":{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},"body":"Added asciidocs","created_at":"2015-05-13T12:02:34Z","updated_at":"2015-05-13T12:54:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3ff3bf532531f2c3abbb44ef1b6a78d3418f7cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2/commits","review_comments_url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2/comments","review_comment_url":"https://api.github.com/repos/lookout/metrics-wizard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lookout/metrics-wizard/issues/2/comments","statuses_url":"https://api.github.com/repos/lookout/metrics-wizard/statuses/3cb5dc8f70f8ae8f842315c54db7db7ecc7899bd","head":{"label":"maheshkelkar:initial-docs","ref":"initial-docs","sha":"3cb5dc8f70f8ae8f842315c54db7db7ecc7899bd","user":{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},"repo":{"id":35158574,"name":"metrics-wizard","full_name":"maheshkelkar/metrics-wizard","owner":{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maheshkelkar/metrics-wizard","description":"A java agent to read your JMX metrics and magically send them somewhere else","fork":true,"url":"https://api.github.com/repos/maheshkelkar/metrics-wizard","forks_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/forks","keys_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/teams","hooks_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/hooks","issue_events_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/issues/events{/number}","events_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/events","assignees_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/assignees{/user}","branches_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/branches{/branch}","tags_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/tags","blobs_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/git/refs{/sha}","trees_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/statuses/{sha}","languages_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/languages","stargazers_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/stargazers","contributors_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/contributors","subscribers_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/subscribers","subscription_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/subscription","commits_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/commits{/sha}","git_commits_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/git/commits{/sha}","comments_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/comments{/number}","issue_comment_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/issues/comments{/number}","contents_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/contents/{+path}","compare_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/merges","archive_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/downloads","issues_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/issues{/number}","pulls_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/pulls{/number}","milestones_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/milestones{/number}","notifications_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/labels{/name}","releases_url":"https://api.github.com/repos/maheshkelkar/metrics-wizard/releases{/id}","created_at":"2015-05-06T12:59:15Z","updated_at":"2015-03-29T18:36:05Z","pushed_at":"2015-05-13T12:01:06Z","git_url":"git://github.com/maheshkelkar/metrics-wizard.git","ssh_url":"git@github.com:maheshkelkar/metrics-wizard.git","clone_url":"https://github.com/maheshkelkar/metrics-wizard.git","svn_url":"https://github.com/maheshkelkar/metrics-wizard","homepage":null,"size":168,"stargazers_count":0,"watchers_count":0,"language":null,"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":"lookout:master","ref":"master","sha":"13d58e81ce867abdebecc0d814081bc254a91905","user":{"login":"lookout","id":47237,"avatar_url":"https://avatars.githubusercontent.com/u/47237?v=3","gravatar_id":"","url":"https://api.github.com/users/lookout","html_url":"https://github.com/lookout","followers_url":"https://api.github.com/users/lookout/followers","following_url":"https://api.github.com/users/lookout/following{/other_user}","gists_url":"https://api.github.com/users/lookout/gists{/gist_id}","starred_url":"https://api.github.com/users/lookout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookout/subscriptions","organizations_url":"https://api.github.com/users/lookout/orgs","repos_url":"https://api.github.com/users/lookout/repos","events_url":"https://api.github.com/users/lookout/events{/privacy}","received_events_url":"https://api.github.com/users/lookout/received_events","type":"Organization","site_admin":false},"repo":{"id":33084117,"name":"metrics-wizard","full_name":"lookout/metrics-wizard","owner":{"login":"lookout","id":47237,"avatar_url":"https://avatars.githubusercontent.com/u/47237?v=3","gravatar_id":"","url":"https://api.github.com/users/lookout","html_url":"https://github.com/lookout","followers_url":"https://api.github.com/users/lookout/followers","following_url":"https://api.github.com/users/lookout/following{/other_user}","gists_url":"https://api.github.com/users/lookout/gists{/gist_id}","starred_url":"https://api.github.com/users/lookout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookout/subscriptions","organizations_url":"https://api.github.com/users/lookout/orgs","repos_url":"https://api.github.com/users/lookout/repos","events_url":"https://api.github.com/users/lookout/events{/privacy}","received_events_url":"https://api.github.com/users/lookout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lookout/metrics-wizard","description":"A java agent to read your JMX metrics and magically send them somewhere else","fork":false,"url":"https://api.github.com/repos/lookout/metrics-wizard","forks_url":"https://api.github.com/repos/lookout/metrics-wizard/forks","keys_url":"https://api.github.com/repos/lookout/metrics-wizard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lookout/metrics-wizard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lookout/metrics-wizard/teams","hooks_url":"https://api.github.com/repos/lookout/metrics-wizard/hooks","issue_events_url":"https://api.github.com/repos/lookout/metrics-wizard/issues/events{/number}","events_url":"https://api.github.com/repos/lookout/metrics-wizard/events","assignees_url":"https://api.github.com/repos/lookout/metrics-wizard/assignees{/user}","branches_url":"https://api.github.com/repos/lookout/metrics-wizard/branches{/branch}","tags_url":"https://api.github.com/repos/lookout/metrics-wizard/tags","blobs_url":"https://api.github.com/repos/lookout/metrics-wizard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lookout/metrics-wizard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lookout/metrics-wizard/git/refs{/sha}","trees_url":"https://api.github.com/repos/lookout/metrics-wizard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lookout/metrics-wizard/statuses/{sha}","languages_url":"https://api.github.com/repos/lookout/metrics-wizard/languages","stargazers_url":"https://api.github.com/repos/lookout/metrics-wizard/stargazers","contributors_url":"https://api.github.com/repos/lookout/metrics-wizard/contributors","subscribers_url":"https://api.github.com/repos/lookout/metrics-wizard/subscribers","subscription_url":"https://api.github.com/repos/lookout/metrics-wizard/subscription","commits_url":"https://api.github.com/repos/lookout/metrics-wizard/commits{/sha}","git_commits_url":"https://api.github.com/repos/lookout/metrics-wizard/git/commits{/sha}","comments_url":"https://api.github.com/repos/lookout/metrics-wizard/comments{/number}","issue_comment_url":"https://api.github.com/repos/lookout/metrics-wizard/issues/comments{/number}","contents_url":"https://api.github.com/repos/lookout/metrics-wizard/contents/{+path}","compare_url":"https://api.github.com/repos/lookout/metrics-wizard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lookout/metrics-wizard/merges","archive_url":"https://api.github.com/repos/lookout/metrics-wizard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lookout/metrics-wizard/downloads","issues_url":"https://api.github.com/repos/lookout/metrics-wizard/issues{/number}","pulls_url":"https://api.github.com/repos/lookout/metrics-wizard/pulls{/number}","milestones_url":"https://api.github.com/repos/lookout/metrics-wizard/milestones{/number}","notifications_url":"https://api.github.com/repos/lookout/metrics-wizard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lookout/metrics-wizard/labels{/name}","releases_url":"https://api.github.com/repos/lookout/metrics-wizard/releases{/id}","created_at":"2015-03-29T18:36:05Z","updated_at":"2015-03-29T18:36:05Z","pushed_at":"2015-05-13T12:02:34Z","git_url":"git://github.com/lookout/metrics-wizard.git","ssh_url":"git@github.com:lookout/metrics-wizard.git","clone_url":"https://github.com/lookout/metrics-wizard.git","svn_url":"https://github.com/lookout/metrics-wizard","homepage":null,"size":229,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2"},"html":{"href":"https://github.com/lookout/metrics-wizard/pull/2"},"issue":{"href":"https://api.github.com/repos/lookout/metrics-wizard/issues/2"},"comments":{"href":"https://api.github.com/repos/lookout/metrics-wizard/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lookout/metrics-wizard/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/lookout/metrics-wizard/statuses/3cb5dc8f70f8ae8f842315c54db7db7ecc7899bd"}}}}