{"action":"created","comment":{"url":"https://api.github.com/repos/Commonjava/indy/pulls/comments/120673698","pull_request_review_id":42656189,"id":120673698,"diff_hunk":"@@ -0,0 +1,138 @@\n+\n+package org.commonjava.indy.metrics.sigar;\n+\n+import com.codahale.metrics.Gauge;\n+import com.codahale.metrics.Metric;\n+import com.codahale.metrics.MetricSet;\n+import org.hyperic.sigar.FileSystem;\n+import org.hyperic.sigar.FileSystemUsage;\n+import org.hyperic.sigar.Sigar;\n+import org.hyperic.sigar.SigarException;\n+\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+public class FilesystemMetricsSet implements MetricSet\n+{\n+    @Override\n+    public Map<String, Metric> getMetrics() {\n+        final Map<String, Metric> gauges = new HashMap<String, Metric>();\n+        Sigar sigar = SigarService.getSigar();\n+        try {\n+            FileSystem[] fileSystems = sigar.getFileSystemList();\n+            for (FileSystem fs : fileSystems) {\n+                if (fs.getType() != FileSystem.TYPE_LOCAL_DISK)\n+                    continue;\n+                createGaugesForFilesystem(gauges, fs);\n+            }\n+        } catch (SigarException e) {\n+            //","path":"subsys/metrics/src/main/java/org/commonjava/indy/metrics/sigar/FilesystemMetricsSet.java","position":29,"original_position":29,"commit_id":"90259d353588df878ad7711b6626eda147526754","original_commit_id":"90259d353588df878ad7711b6626eda147526754","user":{"login":"jdcasey","id":65614,"avatar_url":"https://avatars0.githubusercontent.com/u/65614?v=3","gravatar_id":"","url":"https://api.github.com/users/jdcasey","html_url":"https://github.com/jdcasey","followers_url":"https://api.github.com/users/jdcasey/followers","following_url":"https://api.github.com/users/jdcasey/following{/other_user}","gists_url":"https://api.github.com/users/jdcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/jdcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdcasey/subscriptions","organizations_url":"https://api.github.com/users/jdcasey/orgs","repos_url":"https://api.github.com/users/jdcasey/repos","events_url":"https://api.github.com/users/jdcasey/events{/privacy}","received_events_url":"https://api.github.com/users/jdcasey/received_events","type":"User","site_admin":false},"body":"We probably need to at least log this somewhere. Ignoring exceptions will lead to VERY difficult debugging if we have a problem in a deployment later.\r\n\r\nEven better would be if there was a way to re-throw this, so we can decide at a higher level whether to proceed with Indy startup if the metrics subsystem isn't working correctly.","created_at":"2017-06-07T16:18:12Z","updated_at":"2017-06-07T16:24:35Z","html_url":"https://github.com/Commonjava/indy/pull/714#discussion_r120673698","pull_request_url":"https://api.github.com/repos/Commonjava/indy/pulls/714","_links":{"self":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/comments/120673698"},"html":{"href":"https://github.com/Commonjava/indy/pull/714#discussion_r120673698"},"pull_request":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/714"}}},"pull_request":{"url":"https://api.github.com/repos/Commonjava/indy/pulls/714","id":124368158,"html_url":"https://github.com/Commonjava/indy/pull/714","diff_url":"https://github.com/Commonjava/indy/pull/714.diff","patch_url":"https://github.com/Commonjava/indy/pull/714.patch","issue_url":"https://api.github.com/repos/Commonjava/indy/issues/714","number":714,"state":"open","locked":false,"title":"add system status metrics feature","user":{"login":"bxf12315","id":209745,"avatar_url":"https://avatars2.githubusercontent.com/u/209745?v=3","gravatar_id":"","url":"https://api.github.com/users/bxf12315","html_url":"https://github.com/bxf12315","followers_url":"https://api.github.com/users/bxf12315/followers","following_url":"https://api.github.com/users/bxf12315/following{/other_user}","gists_url":"https://api.github.com/users/bxf12315/gists{/gist_id}","starred_url":"https://api.github.com/users/bxf12315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bxf12315/subscriptions","organizations_url":"https://api.github.com/users/bxf12315/orgs","repos_url":"https://api.github.com/users/bxf12315/repos","events_url":"https://api.github.com/users/bxf12315/events{/privacy}","received_events_url":"https://api.github.com/users/bxf12315/received_events","type":"User","site_admin":false},"body":"@jdcasey \r\nPlease review it.","created_at":"2017-06-07T08:57:13Z","updated_at":"2017-06-07T16:24:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"598d2b138e3d8c283ce7905d63ff846d0afa6eea","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Commonjava/indy/pulls/714/commits","review_comments_url":"https://api.github.com/repos/Commonjava/indy/pulls/714/comments","review_comment_url":"https://api.github.com/repos/Commonjava/indy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Commonjava/indy/issues/714/comments","statuses_url":"https://api.github.com/repos/Commonjava/indy/statuses/90259d353588df878ad7711b6626eda147526754","head":{"label":"bxf12315:sigar","ref":"sigar","sha":"90259d353588df878ad7711b6626eda147526754","user":{"login":"bxf12315","id":209745,"avatar_url":"https://avatars2.githubusercontent.com/u/209745?v=3","gravatar_id":"","url":"https://api.github.com/users/bxf12315","html_url":"https://github.com/bxf12315","followers_url":"https://api.github.com/users/bxf12315/followers","following_url":"https://api.github.com/users/bxf12315/following{/other_user}","gists_url":"https://api.github.com/users/bxf12315/gists{/gist_id}","starred_url":"https://api.github.com/users/bxf12315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bxf12315/subscriptions","organizations_url":"https://api.github.com/users/bxf12315/orgs","repos_url":"https://api.github.com/users/bxf12315/repos","events_url":"https://api.github.com/users/bxf12315/events{/privacy}","received_events_url":"https://api.github.com/users/bxf12315/received_events","type":"User","site_admin":false},"repo":{"id":82521437,"name":"indy","full_name":"bxf12315/indy","owner":{"login":"bxf12315","id":209745,"avatar_url":"https://avatars2.githubusercontent.com/u/209745?v=3","gravatar_id":"","url":"https://api.github.com/users/bxf12315","html_url":"https://github.com/bxf12315","followers_url":"https://api.github.com/users/bxf12315/followers","following_url":"https://api.github.com/users/bxf12315/following{/other_user}","gists_url":"https://api.github.com/users/bxf12315/gists{/gist_id}","starred_url":"https://api.github.com/users/bxf12315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bxf12315/subscriptions","organizations_url":"https://api.github.com/users/bxf12315/orgs","repos_url":"https://api.github.com/users/bxf12315/repos","events_url":"https://api.github.com/users/bxf12315/events{/privacy}","received_events_url":"https://api.github.com/users/bxf12315/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bxf12315/indy","description":"Simple artifact proxy for maven and similar build tools","fork":true,"url":"https://api.github.com/repos/bxf12315/indy","forks_url":"https://api.github.com/repos/bxf12315/indy/forks","keys_url":"https://api.github.com/repos/bxf12315/indy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bxf12315/indy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bxf12315/indy/teams","hooks_url":"https://api.github.com/repos/bxf12315/indy/hooks","issue_events_url":"https://api.github.com/repos/bxf12315/indy/issues/events{/number}","events_url":"https://api.github.com/repos/bxf12315/indy/events","assignees_url":"https://api.github.com/repos/bxf12315/indy/assignees{/user}","branches_url":"https://api.github.com/repos/bxf12315/indy/branches{/branch}","tags_url":"https://api.github.com/repos/bxf12315/indy/tags","blobs_url":"https://api.github.com/repos/bxf12315/indy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bxf12315/indy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bxf12315/indy/git/refs{/sha}","trees_url":"https://api.github.com/repos/bxf12315/indy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bxf12315/indy/statuses/{sha}","languages_url":"https://api.github.com/repos/bxf12315/indy/languages","stargazers_url":"https://api.github.com/repos/bxf12315/indy/stargazers","contributors_url":"https://api.github.com/repos/bxf12315/indy/contributors","subscribers_url":"https://api.github.com/repos/bxf12315/indy/subscribers","subscription_url":"https://api.github.com/repos/bxf12315/indy/subscription","commits_url":"https://api.github.com/repos/bxf12315/indy/commits{/sha}","git_commits_url":"https://api.github.com/repos/bxf12315/indy/git/commits{/sha}","comments_url":"https://api.github.com/repos/bxf12315/indy/comments{/number}","issue_comment_url":"https://api.github.com/repos/bxf12315/indy/issues/comments{/number}","contents_url":"https://api.github.com/repos/bxf12315/indy/contents/{+path}","compare_url":"https://api.github.com/repos/bxf12315/indy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bxf12315/indy/merges","archive_url":"https://api.github.com/repos/bxf12315/indy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bxf12315/indy/downloads","issues_url":"https://api.github.com/repos/bxf12315/indy/issues{/number}","pulls_url":"https://api.github.com/repos/bxf12315/indy/pulls{/number}","milestones_url":"https://api.github.com/repos/bxf12315/indy/milestones{/number}","notifications_url":"https://api.github.com/repos/bxf12315/indy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bxf12315/indy/labels{/name}","releases_url":"https://api.github.com/repos/bxf12315/indy/releases{/id}","deployments_url":"https://api.github.com/repos/bxf12315/indy/deployments","created_at":"2017-02-20T05:47:31Z","updated_at":"2017-02-20T05:47:35Z","pushed_at":"2017-06-07T08:56:30Z","git_url":"git://github.com/bxf12315/indy.git","ssh_url":"git@github.com:bxf12315/indy.git","clone_url":"https://github.com/bxf12315/indy.git","svn_url":"https://github.com/bxf12315/indy","homepage":"","size":20315,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"Commonjava:master","ref":"master","sha":"099aa23e8c99c4943a5c24894fadf6e009eeb31c","user":{"login":"Commonjava","id":12036517,"avatar_url":"https://avatars1.githubusercontent.com/u/12036517?v=3","gravatar_id":"","url":"https://api.github.com/users/Commonjava","html_url":"https://github.com/Commonjava","followers_url":"https://api.github.com/users/Commonjava/followers","following_url":"https://api.github.com/users/Commonjava/following{/other_user}","gists_url":"https://api.github.com/users/Commonjava/gists{/gist_id}","starred_url":"https://api.github.com/users/Commonjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Commonjava/subscriptions","organizations_url":"https://api.github.com/users/Commonjava/orgs","repos_url":"https://api.github.com/users/Commonjava/repos","events_url":"https://api.github.com/users/Commonjava/events{/privacy}","received_events_url":"https://api.github.com/users/Commonjava/received_events","type":"Organization","site_admin":false},"repo":{"id":2431562,"name":"indy","full_name":"Commonjava/indy","owner":{"login":"Commonjava","id":12036517,"avatar_url":"https://avatars1.githubusercontent.com/u/12036517?v=3","gravatar_id":"","url":"https://api.github.com/users/Commonjava","html_url":"https://github.com/Commonjava","followers_url":"https://api.github.com/users/Commonjava/followers","following_url":"https://api.github.com/users/Commonjava/following{/other_user}","gists_url":"https://api.github.com/users/Commonjava/gists{/gist_id}","starred_url":"https://api.github.com/users/Commonjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Commonjava/subscriptions","organizations_url":"https://api.github.com/users/Commonjava/orgs","repos_url":"https://api.github.com/users/Commonjava/repos","events_url":"https://api.github.com/users/Commonjava/events{/privacy}","received_events_url":"https://api.github.com/users/Commonjava/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Commonjava/indy","description":"Simple artifact proxy for maven and similar build tools","fork":false,"url":"https://api.github.com/repos/Commonjava/indy","forks_url":"https://api.github.com/repos/Commonjava/indy/forks","keys_url":"https://api.github.com/repos/Commonjava/indy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Commonjava/indy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Commonjava/indy/teams","hooks_url":"https://api.github.com/repos/Commonjava/indy/hooks","issue_events_url":"https://api.github.com/repos/Commonjava/indy/issues/events{/number}","events_url":"https://api.github.com/repos/Commonjava/indy/events","assignees_url":"https://api.github.com/repos/Commonjava/indy/assignees{/user}","branches_url":"https://api.github.com/repos/Commonjava/indy/branches{/branch}","tags_url":"https://api.github.com/repos/Commonjava/indy/tags","blobs_url":"https://api.github.com/repos/Commonjava/indy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Commonjava/indy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Commonjava/indy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Commonjava/indy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Commonjava/indy/statuses/{sha}","languages_url":"https://api.github.com/repos/Commonjava/indy/languages","stargazers_url":"https://api.github.com/repos/Commonjava/indy/stargazers","contributors_url":"https://api.github.com/repos/Commonjava/indy/contributors","subscribers_url":"https://api.github.com/repos/Commonjava/indy/subscribers","subscription_url":"https://api.github.com/repos/Commonjava/indy/subscription","commits_url":"https://api.github.com/repos/Commonjava/indy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Commonjava/indy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Commonjava/indy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Commonjava/indy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Commonjava/indy/contents/{+path}","compare_url":"https://api.github.com/repos/Commonjava/indy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Commonjava/indy/merges","archive_url":"https://api.github.com/repos/Commonjava/indy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Commonjava/indy/downloads","issues_url":"https://api.github.com/repos/Commonjava/indy/issues{/number}","pulls_url":"https://api.github.com/repos/Commonjava/indy/pulls{/number}","milestones_url":"https://api.github.com/repos/Commonjava/indy/milestones{/number}","notifications_url":"https://api.github.com/repos/Commonjava/indy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Commonjava/indy/labels{/name}","releases_url":"https://api.github.com/repos/Commonjava/indy/releases{/id}","deployments_url":"https://api.github.com/repos/Commonjava/indy/deployments","created_at":"2011-09-21T17:55:24Z","updated_at":"2017-04-26T02:39:37Z","pushed_at":"2017-06-07T14:16:45Z","git_url":"git://github.com/Commonjava/indy.git","ssh_url":"git@github.com:Commonjava/indy.git","clone_url":"https://github.com/Commonjava/indy.git","svn_url":"https://github.com/Commonjava/indy","homepage":"","size":20542,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":19,"forks":16,"open_issues":19,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/714"},"html":{"href":"https://github.com/Commonjava/indy/pull/714"},"issue":{"href":"https://api.github.com/repos/Commonjava/indy/issues/714"},"comments":{"href":"https://api.github.com/repos/Commonjava/indy/issues/714/comments"},"review_comments":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/714/comments"},"review_comment":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Commonjava/indy/pulls/714/commits"},"statuses":{"href":"https://api.github.com/repos/Commonjava/indy/statuses/90259d353588df878ad7711b6626eda147526754"}}}}
{"actor":{"display_login":"jdcasey"}}