{"action":"created","comment":{"url":"https://api.github.com/repos/paypal/squbs/pulls/comments/44143325","id":44143325,"diff_hunk":"@@ -0,0 +1,108 @@\n+#Admin Console\n+\n+The squbs admin console provides a web/JSON interface into system state and statistics of both squbs and the JVM. All state and statistics of squbs and the JVM is provided as JMX MXBeans. Cubes, applications, or components are free to register their own monitors.\n+\n+**Note**: The squbs admin console does not allow JMX method execution or modifications of any settings just yet.\n+\n+##Dependencies\n+\n+To use the squbs admin console, simply add the following dependencies in your build.sbt file or Scala build script:\n+\n+```\n+  \"org.squbs\" %% \"squbs-admin\" % squbsVersion\n+```\n+\n+squbs-admin will be auto-detected. No API is required.\n+\n+##Accessing Bean Information\n+\n+squbs-admin uses the context `/adm`. Just hitting `/adm` alone will list out the catalog of JMX MXBeans and the corresponding URLs to access the beans as in the following example:\n+\n+```json\n+{\n+  \"JMImplementation:type=MBeanServerDelegate\" : \"http://localhost:8080/adm/bean/JMImplementation:type~MBeanServerDelegate\",\n+  \"com.sun.management:type=DiagnosticCommand\" : \"http://localhost:8080/adm/bean/com.sun.management:type~DiagnosticCommand\",\n+  \"com.sun.management:type=HotSpotDiagnostic\" : \"http://localhost:8080/adm/bean/com.sun.management:type~HotSpotDiagnostic\",\n+  \"java.lang:type=ClassLoading\" : \"http://localhost:8080/adm/bean/java.lang:type~ClassLoading\",\n+  \"java.lang:type=Compilation\" : \"http://localhost:8080/adm/bean/java.lang:type~Compilation\",\n+  \"java.lang:type=GarbageCollector,name=PS MarkSweep\" : \"http://localhost:8080/adm/bean/java.lang:type~GarbageCollector,name~PS%20MarkSweep\",\n+  \"java.lang:type=GarbageCollector,name=PS Scavenge\" : \"http://localhost:8080/adm/bean/java.lang:type~GarbageCollector,name~PS%20Scavenge\",\n+  \"java.lang:type=Memory\" : \"http://localhost:8080/adm/bean/java.lang:type~Memory\",\n+  \"java.lang:type=MemoryManager,name=CodeCacheManager\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryManager,name~CodeCacheManager\",\n+  \"java.lang:type=MemoryManager,name=Metaspace Manager\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryManager,name~Metaspace%20Manager\",\n+  \"java.lang:type=MemoryPool,name=Code Cache\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~Code%20Cache\",\n+  \"java.lang:type=MemoryPool,name=Compressed Class Space\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~Compressed%20Class%20Space\",\n+  \"java.lang:type=MemoryPool,name=Metaspace\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~Metaspace\",\n+  \"java.lang:type=MemoryPool,name=PS Eden Space\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~PS%20Eden%20Space\",\n+  \"java.lang:type=MemoryPool,name=PS Old Gen\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~PS%20Old%20Gen\",\n+  \"java.lang:type=MemoryPool,name=PS Survivor Space\" : \"http://localhost:8080/adm/bean/java.lang:type~MemoryPool,name~PS%20Survivor%20Space\",\n+  \"java.lang:type=OperatingSystem\" : \"http://localhost:8080/adm/bean/java.lang:type~OperatingSystem\",\n+  \"java.lang:type=Runtime\" : \"http://localhost:8080/adm/bean/java.lang:type~Runtime\",\n+  \"java.lang:type=Threading\" : \"http://localhost:8080/adm/bean/java.lang:type~Threading\",\n+  \"java.nio:type=BufferPool,name=direct\" : \"http://localhost:8080/adm/bean/java.nio:type~BufferPool,name~direct\",\n+  \"java.nio:type=BufferPool,name=mapped\" : \"http://localhost:8080/adm/bean/java.nio:type~BufferPool,name~mapped\",\n+  \"java.util.logging:type=Logging\" : \"http://localhost:8080/adm/bean/java.util.logging:type~Logging\",\n+  \"org.squbs.unicomplex:type=CubeState,name=admin\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~CubeState,name~admin\",\n+  \"org.squbs.unicomplex:type=Cubes\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~Cubes\",\n+  \"org.squbs.unicomplex:type=Extensions\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~Extensions\",\n+  \"org.squbs.unicomplex:type=Listeners\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~Listeners\",\n+  \"org.squbs.unicomplex:type=ServerStats,listener=default-listener\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~ServerStats,listener~default-listener\",\n+  \"org.squbs.unicomplex:type=SystemSetting\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~SystemSetting\",\n+  \"org.squbs.unicomplex:type=SystemState\" : \"http://localhost:8080/adm/bean/org.squbs.unicomplex:type~SystemState\"\n+}\n+```\n+\n+JSON plugins for your browser would detect and allow easy clicking on the links. Following the provided links, for instance, bean `org.squbs.unicomplex:type=Cubes` will show all bean detail as follows:\n+\n+```json\n+{\n+  \"Cubes\" : [\n+    {\n+      \"fullName\" : \"org.squbs.admin\",\n+      \"name\" : \"admin\",\n+      \"supervisor\" : \"Actor[akka://squbs/user/admin#104594558]\",\n+      \"version\" : \"0.7.1\"\n+    }\n+  ]\n+}\n+```\n+\n+##Bean URL & Encoding\n+\n+All beans are under the `/adm/bean/` path, followed by the full bean object name. The bean object name gets translated as follows to make it possible for easy URL access:\n+\n+1. The `=` in the bean name is replaced with `~`.\n+2. All other characters are encoded according to standard URL encoding. For instance, a space in the name is encoded as `%20`.\n+\n+For instance, to access the bean with object name `java.lang:type=GarbageCollector,name=PS Scavenge`, the URL path would be `/adm/bean/java.lang:type~GarbageCollector,name~PS%20Scavenge`\n+\n+##Listener\n+\n+squbs-admin binds to the `admin-listener`. By default, this is an alias of the `default-listener`. Services can override the Unicomplex configuration and re-assign the `admin-listener` alias to any other defined listener of choice.\n+\n+##Exclusions\n+\n+In many cases, a MXBean may contain information deemed sensitive, and should not be displayed in the admin console. The best way around this is, of course, to not include such information into a JMX bean in the first place. However, sometimes these beans are not exposed by your component but by a third party component or library and there is no way to hide such information short of modifying the third party component. Exclusions are a feature provided by the admin console to hide such information from showing in the JSON.\n+\n+###Configuring Exclusions\n+\n+Exclusions are configured under squbs.admin in your standard configuration in `application.conf` as can be seen in the following example:\n+\n+```\n+squbs.admin {\n+  exclusions = [","path":"docs/console.md","position":113,"original_position":93,"commit_id":"cf8fed038efcf2975ce202c8e87226171fe16d1e","original_commit_id":"833261c402b8632f043d35cb0b05f6cfd8e25bc1","user":{"login":"anilgursel","id":3316621,"avatar_url":"https://avatars.githubusercontent.com/u/3316621?v=3","gravatar_id":"","url":"https://api.github.com/users/anilgursel","html_url":"https://github.com/anilgursel","followers_url":"https://api.github.com/users/anilgursel/followers","following_url":"https://api.github.com/users/anilgursel/following{/other_user}","gists_url":"https://api.github.com/users/anilgursel/gists{/gist_id}","starred_url":"https://api.github.com/users/anilgursel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anilgursel/subscriptions","organizations_url":"https://api.github.com/users/anilgursel/orgs","repos_url":"https://api.github.com/users/anilgursel/repos","events_url":"https://api.github.com/users/anilgursel/events{/privacy}","received_events_url":"https://api.github.com/users/anilgursel/received_events","type":"User","site_admin":false},"body":"On one side, app should have all the freedom to override.  On the other side, at the framework level, if we bring a third party jar and would like to hide certain fields, I would prefer them not to be overridden accidentally.  \r\n\r\nNot sure which one weighs more :)","created_at":"2015-11-06T14:50:54Z","updated_at":"2015-11-06T14:50:54Z","html_url":"https://github.com/paypal/squbs/pull/123#discussion_r44143325","pull_request_url":"https://api.github.com/repos/paypal/squbs/pulls/123","_links":{"self":{"href":"https://api.github.com/repos/paypal/squbs/pulls/comments/44143325"},"html":{"href":"https://github.com/paypal/squbs/pull/123#discussion_r44143325"},"pull_request":{"href":"https://api.github.com/repos/paypal/squbs/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/paypal/squbs/pulls/123","id":49299060,"html_url":"https://github.com/paypal/squbs/pull/123","diff_url":"https://github.com/paypal/squbs/pull/123.diff","patch_url":"https://github.com/paypal/squbs/pull/123.patch","issue_url":"https://api.github.com/repos/paypal/squbs/issues/123","number":123,"state":"open","locked":false,"title":"#31 Admin console - use json4s to render","user":{"login":"akara","id":77111,"avatar_url":"https://avatars.githubusercontent.com/u/77111?v=3","gravatar_id":"","url":"https://api.github.com/users/akara","html_url":"https://github.com/akara","followers_url":"https://api.github.com/users/akara/followers","following_url":"https://api.github.com/users/akara/following{/other_user}","gists_url":"https://api.github.com/users/akara/gists{/gist_id}","starred_url":"https://api.github.com/users/akara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akara/subscriptions","organizations_url":"https://api.github.com/users/akara/orgs","repos_url":"https://api.github.com/users/akara/repos","events_url":"https://api.github.com/users/akara/events{/privacy}","received_events_url":"https://api.github.com/users/akara/received_events","type":"User","site_admin":false},"body":"All good to merge from my side.","created_at":"2015-10-30T17:32:12Z","updated_at":"2015-11-06T14:50:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39faaa95609f35aab67d718dd4dd01c78a7de567","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/paypal/squbs/pulls/123/commits","review_comments_url":"https://api.github.com/repos/paypal/squbs/pulls/123/comments","review_comment_url":"https://api.github.com/repos/paypal/squbs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paypal/squbs/issues/123/comments","statuses_url":"https://api.github.com/repos/paypal/squbs/statuses/cf8fed038efcf2975ce202c8e87226171fe16d1e","head":{"label":"akara:admin-alt","ref":"admin-alt","sha":"cf8fed038efcf2975ce202c8e87226171fe16d1e","user":{"login":"akara","id":77111,"avatar_url":"https://avatars.githubusercontent.com/u/77111?v=3","gravatar_id":"","url":"https://api.github.com/users/akara","html_url":"https://github.com/akara","followers_url":"https://api.github.com/users/akara/followers","following_url":"https://api.github.com/users/akara/following{/other_user}","gists_url":"https://api.github.com/users/akara/gists{/gist_id}","starred_url":"https://api.github.com/users/akara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akara/subscriptions","organizations_url":"https://api.github.com/users/akara/orgs","repos_url":"https://api.github.com/users/akara/repos","events_url":"https://api.github.com/users/akara/events{/privacy}","received_events_url":"https://api.github.com/users/akara/received_events","type":"User","site_admin":false},"repo":{"id":40934086,"name":"squbs","full_name":"akara/squbs","owner":{"login":"akara","id":77111,"avatar_url":"https://avatars.githubusercontent.com/u/77111?v=3","gravatar_id":"","url":"https://api.github.com/users/akara","html_url":"https://github.com/akara","followers_url":"https://api.github.com/users/akara/followers","following_url":"https://api.github.com/users/akara/following{/other_user}","gists_url":"https://api.github.com/users/akara/gists{/gist_id}","starred_url":"https://api.github.com/users/akara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akara/subscriptions","organizations_url":"https://api.github.com/users/akara/orgs","repos_url":"https://api.github.com/users/akara/repos","events_url":"https://api.github.com/users/akara/events{/privacy}","received_events_url":"https://api.github.com/users/akara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akara/squbs","description":"","fork":true,"url":"https://api.github.com/repos/akara/squbs","forks_url":"https://api.github.com/repos/akara/squbs/forks","keys_url":"https://api.github.com/repos/akara/squbs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akara/squbs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akara/squbs/teams","hooks_url":"https://api.github.com/repos/akara/squbs/hooks","issue_events_url":"https://api.github.com/repos/akara/squbs/issues/events{/number}","events_url":"https://api.github.com/repos/akara/squbs/events","assignees_url":"https://api.github.com/repos/akara/squbs/assignees{/user}","branches_url":"https://api.github.com/repos/akara/squbs/branches{/branch}","tags_url":"https://api.github.com/repos/akara/squbs/tags","blobs_url":"https://api.github.com/repos/akara/squbs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akara/squbs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akara/squbs/git/refs{/sha}","trees_url":"https://api.github.com/repos/akara/squbs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akara/squbs/statuses/{sha}","languages_url":"https://api.github.com/repos/akara/squbs/languages","stargazers_url":"https://api.github.com/repos/akara/squbs/stargazers","contributors_url":"https://api.github.com/repos/akara/squbs/contributors","subscribers_url":"https://api.github.com/repos/akara/squbs/subscribers","subscription_url":"https://api.github.com/repos/akara/squbs/subscription","commits_url":"https://api.github.com/repos/akara/squbs/commits{/sha}","git_commits_url":"https://api.github.com/repos/akara/squbs/git/commits{/sha}","comments_url":"https://api.github.com/repos/akara/squbs/comments{/number}","issue_comment_url":"https://api.github.com/repos/akara/squbs/issues/comments{/number}","contents_url":"https://api.github.com/repos/akara/squbs/contents/{+path}","compare_url":"https://api.github.com/repos/akara/squbs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akara/squbs/merges","archive_url":"https://api.github.com/repos/akara/squbs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akara/squbs/downloads","issues_url":"https://api.github.com/repos/akara/squbs/issues{/number}","pulls_url":"https://api.github.com/repos/akara/squbs/pulls{/number}","milestones_url":"https://api.github.com/repos/akara/squbs/milestones{/number}","notifications_url":"https://api.github.com/repos/akara/squbs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akara/squbs/labels{/name}","releases_url":"https://api.github.com/repos/akara/squbs/releases{/id}","created_at":"2015-08-17T22:35:29Z","updated_at":"2015-08-17T22:35:30Z","pushed_at":"2015-11-05T18:57:26Z","git_url":"git://github.com/akara/squbs.git","ssh_url":"git@github.com:akara/squbs.git","clone_url":"https://github.com/akara/squbs.git","svn_url":"https://github.com/akara/squbs","homepage":null,"size":5811,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"paypal:develop","ref":"develop","sha":"f331d2a777fcfdbc668c406ea7e25e0832f72cfc","user":{"login":"paypal","id":476675,"avatar_url":"https://avatars.githubusercontent.com/u/476675?v=3","gravatar_id":"","url":"https://api.github.com/users/paypal","html_url":"https://github.com/paypal","followers_url":"https://api.github.com/users/paypal/followers","following_url":"https://api.github.com/users/paypal/following{/other_user}","gists_url":"https://api.github.com/users/paypal/gists{/gist_id}","starred_url":"https://api.github.com/users/paypal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paypal/subscriptions","organizations_url":"https://api.github.com/users/paypal/orgs","repos_url":"https://api.github.com/users/paypal/repos","events_url":"https://api.github.com/users/paypal/events{/privacy}","received_events_url":"https://api.github.com/users/paypal/received_events","type":"Organization","site_admin":false},"repo":{"id":38714007,"name":"squbs","full_name":"paypal/squbs","owner":{"login":"paypal","id":476675,"avatar_url":"https://avatars.githubusercontent.com/u/476675?v=3","gravatar_id":"","url":"https://api.github.com/users/paypal","html_url":"https://github.com/paypal","followers_url":"https://api.github.com/users/paypal/followers","following_url":"https://api.github.com/users/paypal/following{/other_user}","gists_url":"https://api.github.com/users/paypal/gists{/gist_id}","starred_url":"https://api.github.com/users/paypal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paypal/subscriptions","organizations_url":"https://api.github.com/users/paypal/orgs","repos_url":"https://api.github.com/users/paypal/repos","events_url":"https://api.github.com/users/paypal/events{/privacy}","received_events_url":"https://api.github.com/users/paypal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/paypal/squbs","description":"Akka/Spray for Large-Scale Production Deployments","fork":false,"url":"https://api.github.com/repos/paypal/squbs","forks_url":"https://api.github.com/repos/paypal/squbs/forks","keys_url":"https://api.github.com/repos/paypal/squbs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paypal/squbs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paypal/squbs/teams","hooks_url":"https://api.github.com/repos/paypal/squbs/hooks","issue_events_url":"https://api.github.com/repos/paypal/squbs/issues/events{/number}","events_url":"https://api.github.com/repos/paypal/squbs/events","assignees_url":"https://api.github.com/repos/paypal/squbs/assignees{/user}","branches_url":"https://api.github.com/repos/paypal/squbs/branches{/branch}","tags_url":"https://api.github.com/repos/paypal/squbs/tags","blobs_url":"https://api.github.com/repos/paypal/squbs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paypal/squbs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paypal/squbs/git/refs{/sha}","trees_url":"https://api.github.com/repos/paypal/squbs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paypal/squbs/statuses/{sha}","languages_url":"https://api.github.com/repos/paypal/squbs/languages","stargazers_url":"https://api.github.com/repos/paypal/squbs/stargazers","contributors_url":"https://api.github.com/repos/paypal/squbs/contributors","subscribers_url":"https://api.github.com/repos/paypal/squbs/subscribers","subscription_url":"https://api.github.com/repos/paypal/squbs/subscription","commits_url":"https://api.github.com/repos/paypal/squbs/commits{/sha}","git_commits_url":"https://api.github.com/repos/paypal/squbs/git/commits{/sha}","comments_url":"https://api.github.com/repos/paypal/squbs/comments{/number}","issue_comment_url":"https://api.github.com/repos/paypal/squbs/issues/comments{/number}","contents_url":"https://api.github.com/repos/paypal/squbs/contents/{+path}","compare_url":"https://api.github.com/repos/paypal/squbs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paypal/squbs/merges","archive_url":"https://api.github.com/repos/paypal/squbs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paypal/squbs/downloads","issues_url":"https://api.github.com/repos/paypal/squbs/issues{/number}","pulls_url":"https://api.github.com/repos/paypal/squbs/pulls{/number}","milestones_url":"https://api.github.com/repos/paypal/squbs/milestones{/number}","notifications_url":"https://api.github.com/repos/paypal/squbs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paypal/squbs/labels{/name}","releases_url":"https://api.github.com/repos/paypal/squbs/releases{/id}","created_at":"2015-07-07T20:48:12Z","updated_at":"2015-11-05T03:44:57Z","pushed_at":"2015-11-06T08:17:31Z","git_url":"git://github.com/paypal/squbs.git","ssh_url":"git@github.com:paypal/squbs.git","clone_url":"https://github.com/paypal/squbs.git","svn_url":"https://github.com/paypal/squbs","homepage":"","size":6424,"stargazers_count":12,"watchers_count":12,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":32,"forks":15,"open_issues":32,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paypal/squbs/pulls/123"},"html":{"href":"https://github.com/paypal/squbs/pull/123"},"issue":{"href":"https://api.github.com/repos/paypal/squbs/issues/123"},"comments":{"href":"https://api.github.com/repos/paypal/squbs/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/paypal/squbs/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/paypal/squbs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paypal/squbs/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/paypal/squbs/statuses/cf8fed038efcf2975ce202c8e87226171fe16d1e"}}}}