{"action":"created","comment":{"url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments/211555509","pull_request_review_id":147997544,"id":211555509,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTU1NTUwOQ==","diff_hunk":"@@ -0,0 +1,187 @@\n+package main\n+\n+import (\n+\t\"encoding/json\"\n+\t\"io/ioutil\"\n+\t\"os\"\n+\t\"syscall\"\n+\n+\t\"github.com/prometheus/client_golang/prometheus\"\n+)\n+\n+var (\n+\tbrick_labels = []string{\n+\t\t\"host\",\n+\t\t\"id\",\n+\t\t\"brick_path\",\n+\t\t\"volume\",\n+\t\t\"subvolume\",\n+\t}\n+\n+\tglusterBrickUsedCapacity = prometheus.NewGaugeVec(\n+\t\tprometheus.GaugeOpts{\n+\t\t\tNamespace: \"gluster\",\n+\t\t\tName:      \"brick_used_capacity\",\n+\t\t\tHelp:      \"Used capacity of gluster bricks\",\n+\t\t},\n+\t\tbrick_labels,\n+\t)\n+\n+\tglusterBrickFreeCapacity = prometheus.NewGaugeVec(\n+\t\tprometheus.GaugeOpts{\n+\t\t\tNamespace: \"gluster\",\n+\t\t\tName:      \"brick_free_capacity\",\n+\t\t\tHelp:      \"Free capacity of gluster bricks\",\n+\t\t},\n+\t\tbrick_labels,\n+\t)\n+\n+\tglusterBrickAllCapacity = prometheus.NewGaugeVec(\n+\t\tprometheus.GaugeOpts{\n+\t\t\tNamespace: \"gluster\",\n+\t\t\tName:      \"brick_all_capacity\",\n+\t\t\tHelp:      \"Total capacity of gluster bricks\",\n+\t\t},\n+\t\tbrick_labels,\n+\t)\n+\n+\tglusterBrickDiskInodesAll = prometheus.NewGaugeVec(\n+\t\tprometheus.GaugeOpts{\n+\t\t\tNamespace: \"gluster\",\n+\t\t\tName:      \"brick_disk_inodes_all\",","path":"gluster_exporter/metric_brick.go","position":51,"original_position":51,"commit_id":"91e0337d7a507d99a661ef55a22dd7c24759e2ca","original_commit_id":"91e0337d7a507d99a661ef55a22dd7c24759e2ca","user":{"login":"shtripat","id":6771252,"node_id":"MDQ6VXNlcjY3NzEyNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/6771252?v=4","gravatar_id":"","url":"https://api.github.com/users/shtripat","html_url":"https://github.com/shtripat","followers_url":"https://api.github.com/users/shtripat/followers","following_url":"https://api.github.com/users/shtripat/following{/other_user}","gists_url":"https://api.github.com/users/shtripat/gists{/gist_id}","starred_url":"https://api.github.com/users/shtripat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shtripat/subscriptions","organizations_url":"https://api.github.com/users/shtripat/orgs","repos_url":"https://api.github.com/users/shtripat/repos","events_url":"https://api.github.com/users/shtripat/events{/privacy}","received_events_url":"https://api.github.com/users/shtripat/received_events","type":"User","site_admin":false},"body":"Ack","created_at":"2018-08-21T10:28:13Z","updated_at":"2018-08-21T10:28:13Z","html_url":"https://github.com/gluster/gluster-prometheus/pull/10#discussion_r211555509","pull_request_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments/211555509"},"html":{"href":"https://github.com/gluster/gluster-prometheus/pull/10#discussion_r211555509"},"pull_request":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10"}},"in_reply_to_id":211490424},"pull_request":{"url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10","id":209512233,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NTEyMjMz","html_url":"https://github.com/gluster/gluster-prometheus/pull/10","diff_url":"https://github.com/gluster/gluster-prometheus/pull/10.diff","patch_url":"https://github.com/gluster/gluster-prometheus/pull/10.patch","issue_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues/10","number":10,"state":"open","locked":false,"title":"WIP - Added metrics for brick utilization","user":{"login":"shtripat","id":6771252,"node_id":"MDQ6VXNlcjY3NzEyNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/6771252?v=4","gravatar_id":"","url":"https://api.github.com/users/shtripat","html_url":"https://github.com/shtripat","followers_url":"https://api.github.com/users/shtripat/followers","following_url":"https://api.github.com/users/shtripat/following{/other_user}","gists_url":"https://api.github.com/users/shtripat/gists{/gist_id}","starred_url":"https://api.github.com/users/shtripat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shtripat/subscriptions","organizations_url":"https://api.github.com/users/shtripat/orgs","repos_url":"https://api.github.com/users/shtripat/repos","events_url":"https://api.github.com/users/shtripat/events{/privacy}","received_events_url":"https://api.github.com/users/shtripat/received_events","type":"User","site_admin":false},"body":"This change just calculates the individual brick utilization details\r\nand doesnt do any aggregation based on volume types etc. The same\r\nwould be required at more abstract layer.\r\n\r\nSigned-off-by: Shubhendu <shtripat@redhat.com>","created_at":"2018-08-20T12:57:19Z","updated_at":"2018-08-21T10:28:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"316e6ddf9844cba808415cf83bb817438c80895a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10/commits","review_comments_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10/comments","review_comment_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues/10/comments","statuses_url":"https://api.github.com/repos/gluster/gluster-prometheus/statuses/91e0337d7a507d99a661ef55a22dd7c24759e2ca","head":{"label":"shtripat:brick-utilization-metrics","ref":"brick-utilization-metrics","sha":"91e0337d7a507d99a661ef55a22dd7c24759e2ca","user":{"login":"shtripat","id":6771252,"node_id":"MDQ6VXNlcjY3NzEyNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/6771252?v=4","gravatar_id":"","url":"https://api.github.com/users/shtripat","html_url":"https://github.com/shtripat","followers_url":"https://api.github.com/users/shtripat/followers","following_url":"https://api.github.com/users/shtripat/following{/other_user}","gists_url":"https://api.github.com/users/shtripat/gists{/gist_id}","starred_url":"https://api.github.com/users/shtripat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shtripat/subscriptions","organizations_url":"https://api.github.com/users/shtripat/orgs","repos_url":"https://api.github.com/users/shtripat/repos","events_url":"https://api.github.com/users/shtripat/events{/privacy}","received_events_url":"https://api.github.com/users/shtripat/received_events","type":"User","site_admin":false},"repo":{"id":145416719,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU0MTY3MTk=","name":"gluster-prometheus","full_name":"shtripat/gluster-prometheus","owner":{"login":"shtripat","id":6771252,"node_id":"MDQ6VXNlcjY3NzEyNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/6771252?v=4","gravatar_id":"","url":"https://api.github.com/users/shtripat","html_url":"https://github.com/shtripat","followers_url":"https://api.github.com/users/shtripat/followers","following_url":"https://api.github.com/users/shtripat/following{/other_user}","gists_url":"https://api.github.com/users/shtripat/gists{/gist_id}","starred_url":"https://api.github.com/users/shtripat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shtripat/subscriptions","organizations_url":"https://api.github.com/users/shtripat/orgs","repos_url":"https://api.github.com/users/shtripat/repos","events_url":"https://api.github.com/users/shtripat/events{/privacy}","received_events_url":"https://api.github.com/users/shtripat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shtripat/gluster-prometheus","description":null,"fork":true,"url":"https://api.github.com/repos/shtripat/gluster-prometheus","forks_url":"https://api.github.com/repos/shtripat/gluster-prometheus/forks","keys_url":"https://api.github.com/repos/shtripat/gluster-prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shtripat/gluster-prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shtripat/gluster-prometheus/teams","hooks_url":"https://api.github.com/repos/shtripat/gluster-prometheus/hooks","issue_events_url":"https://api.github.com/repos/shtripat/gluster-prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/shtripat/gluster-prometheus/events","assignees_url":"https://api.github.com/repos/shtripat/gluster-prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/shtripat/gluster-prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/shtripat/gluster-prometheus/tags","blobs_url":"https://api.github.com/repos/shtripat/gluster-prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shtripat/gluster-prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shtripat/gluster-prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/shtripat/gluster-prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shtripat/gluster-prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/shtripat/gluster-prometheus/languages","stargazers_url":"https://api.github.com/repos/shtripat/gluster-prometheus/stargazers","contributors_url":"https://api.github.com/repos/shtripat/gluster-prometheus/contributors","subscribers_url":"https://api.github.com/repos/shtripat/gluster-prometheus/subscribers","subscription_url":"https://api.github.com/repos/shtripat/gluster-prometheus/subscription","commits_url":"https://api.github.com/repos/shtripat/gluster-prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/shtripat/gluster-prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/shtripat/gluster-prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/shtripat/gluster-prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/shtripat/gluster-prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/shtripat/gluster-prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shtripat/gluster-prometheus/merges","archive_url":"https://api.github.com/repos/shtripat/gluster-prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shtripat/gluster-prometheus/downloads","issues_url":"https://api.github.com/repos/shtripat/gluster-prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/shtripat/gluster-prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/shtripat/gluster-prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/shtripat/gluster-prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shtripat/gluster-prometheus/labels{/name}","releases_url":"https://api.github.com/repos/shtripat/gluster-prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/shtripat/gluster-prometheus/deployments","created_at":"2018-08-20T12:47:39Z","updated_at":"2018-08-20T12:47:41Z","pushed_at":"2018-08-21T05:34:54Z","git_url":"git://github.com/shtripat/gluster-prometheus.git","ssh_url":"git@github.com:shtripat/gluster-prometheus.git","clone_url":"https://github.com/shtripat/gluster-prometheus.git","svn_url":"https://github.com/shtripat/gluster-prometheus","homepage":null,"size":6,"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,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gluster:master","ref":"master","sha":"b9d43d6f7d2eb9cb408faafa4bb159efe8991ef0","user":{"login":"gluster","id":622644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjY0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/622644?v=4","gravatar_id":"","url":"https://api.github.com/users/gluster","html_url":"https://github.com/gluster","followers_url":"https://api.github.com/users/gluster/followers","following_url":"https://api.github.com/users/gluster/following{/other_user}","gists_url":"https://api.github.com/users/gluster/gists{/gist_id}","starred_url":"https://api.github.com/users/gluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluster/subscriptions","organizations_url":"https://api.github.com/users/gluster/orgs","repos_url":"https://api.github.com/users/gluster/repos","events_url":"https://api.github.com/users/gluster/events{/privacy}","received_events_url":"https://api.github.com/users/gluster/received_events","type":"Organization","site_admin":false},"repo":{"id":117634855,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc2MzQ4NTU=","name":"gluster-prometheus","full_name":"gluster/gluster-prometheus","owner":{"login":"gluster","id":622644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjY0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/622644?v=4","gravatar_id":"","url":"https://api.github.com/users/gluster","html_url":"https://github.com/gluster","followers_url":"https://api.github.com/users/gluster/followers","following_url":"https://api.github.com/users/gluster/following{/other_user}","gists_url":"https://api.github.com/users/gluster/gists{/gist_id}","starred_url":"https://api.github.com/users/gluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluster/subscriptions","organizations_url":"https://api.github.com/users/gluster/orgs","repos_url":"https://api.github.com/users/gluster/repos","events_url":"https://api.github.com/users/gluster/events{/privacy}","received_events_url":"https://api.github.com/users/gluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gluster/gluster-prometheus","description":null,"fork":false,"url":"https://api.github.com/repos/gluster/gluster-prometheus","forks_url":"https://api.github.com/repos/gluster/gluster-prometheus/forks","keys_url":"https://api.github.com/repos/gluster/gluster-prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gluster/gluster-prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gluster/gluster-prometheus/teams","hooks_url":"https://api.github.com/repos/gluster/gluster-prometheus/hooks","issue_events_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/gluster/gluster-prometheus/events","assignees_url":"https://api.github.com/repos/gluster/gluster-prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/gluster/gluster-prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/gluster/gluster-prometheus/tags","blobs_url":"https://api.github.com/repos/gluster/gluster-prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gluster/gluster-prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gluster/gluster-prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/gluster/gluster-prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gluster/gluster-prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/gluster/gluster-prometheus/languages","stargazers_url":"https://api.github.com/repos/gluster/gluster-prometheus/stargazers","contributors_url":"https://api.github.com/repos/gluster/gluster-prometheus/contributors","subscribers_url":"https://api.github.com/repos/gluster/gluster-prometheus/subscribers","subscription_url":"https://api.github.com/repos/gluster/gluster-prometheus/subscription","commits_url":"https://api.github.com/repos/gluster/gluster-prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/gluster/gluster-prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/gluster/gluster-prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/gluster/gluster-prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/gluster/gluster-prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gluster/gluster-prometheus/merges","archive_url":"https://api.github.com/repos/gluster/gluster-prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gluster/gluster-prometheus/downloads","issues_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/gluster/gluster-prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/gluster/gluster-prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gluster/gluster-prometheus/labels{/name}","releases_url":"https://api.github.com/repos/gluster/gluster-prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/gluster/gluster-prometheus/deployments","created_at":"2018-01-16T05:19:59Z","updated_at":"2018-08-20T15:11:39Z","pushed_at":"2018-08-21T05:34:56Z","git_url":"git://github.com/gluster/gluster-prometheus.git","ssh_url":"git@github.com:gluster/gluster-prometheus.git","clone_url":"https://github.com/gluster/gluster-prometheus.git","svn_url":"https://github.com/gluster/gluster-prometheus","homepage":null,"size":5,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":6,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10"},"html":{"href":"https://github.com/gluster/gluster-prometheus/pull/10"},"issue":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/issues/10"},"comments":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/statuses/91e0337d7a507d99a661ef55a22dd7c24759e2ca"}},"author_association":"NONE"}}
{"actor":{"display_login":"shtripat"}}