{"action":"created","comment":{"url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments/227809043","pull_request_review_id":167929418,"id":227809043,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzgwOTA0Mw==","diff_hunk":"@@ -114,3 +101,24 @@ func LocalPeerID(config *Config) (string, error) {\n \t}\n \treturn \"\", errors.New(\"unable to find peer address\")\n }\n+\n+// GetGlusterVersion gets the glusterfs version\n+func GetGlusterVersion() (string, error) {\n+\tcmd := \"glusterfs --version | head -1\"\n+\tbytes, err := ExecuteCmd(cmd)\n+\tif err != nil {\n+\t\treturn \"\", err\n+\t}\n+\tstdout := string(bytes[:])\n+\tfields := strings.Fields(stdout)\n+\treturn fields[1], err\n+}\n+\n+// ExecuteCmd enables to execute system cmds and returns stdout, err\n+func ExecuteCmd(cmd string) ([]byte, error) {","path":"pkg/glusterutils/exporterd.go","position":77,"original_position":77,"commit_id":"6004d4fba9f475155d3d7231eab2bbc4390e5f25","original_commit_id":"6004d4fba9f475155d3d7231eab2bbc4390e5f25","user":{"login":"aravindavk","id":338230,"node_id":"MDQ6VXNlcjMzODIzMA==","avatar_url":"https://avatars3.githubusercontent.com/u/338230?v=4","gravatar_id":"","url":"https://api.github.com/users/aravindavk","html_url":"https://github.com/aravindavk","followers_url":"https://api.github.com/users/aravindavk/followers","following_url":"https://api.github.com/users/aravindavk/following{/other_user}","gists_url":"https://api.github.com/users/aravindavk/gists{/gist_id}","starred_url":"https://api.github.com/users/aravindavk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aravindavk/subscriptions","organizations_url":"https://api.github.com/users/aravindavk/orgs","repos_url":"https://api.github.com/users/aravindavk/repos","events_url":"https://api.github.com/users/aravindavk/events{/privacy}","received_events_url":"https://api.github.com/users/aravindavk/received_events","type":"User","site_admin":false},"body":"exposing this function not required. change name to `executeCmd`","created_at":"2018-10-24T14:19:20Z","updated_at":"2018-10-24T14:31:41Z","html_url":"https://github.com/gluster/gluster-prometheus/pull/47#discussion_r227809043","pull_request_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/comments/227809043"},"html":{"href":"https://github.com/gluster/gluster-prometheus/pull/47#discussion_r227809043"},"pull_request":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47","id":222338130,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMzM4MTMw","html_url":"https://github.com/gluster/gluster-prometheus/pull/47","diff_url":"https://github.com/gluster/gluster-prometheus/pull/47.diff","patch_url":"https://github.com/gluster/gluster-prometheus/pull/47.patch","issue_url":"https://api.github.com/repos/gluster/gluster-prometheus/issues/47","number":47,"state":"open","locked":false,"title":"gluster interface for gd1 and gd2","user":{"login":"vredara","id":25246678,"node_id":"MDQ6VXNlcjI1MjQ2Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/25246678?v=4","gravatar_id":"","url":"https://api.github.com/users/vredara","html_url":"https://github.com/vredara","followers_url":"https://api.github.com/users/vredara/followers","following_url":"https://api.github.com/users/vredara/following{/other_user}","gists_url":"https://api.github.com/users/vredara/gists{/gist_id}","starred_url":"https://api.github.com/users/vredara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vredara/subscriptions","organizations_url":"https://api.github.com/users/vredara/orgs","repos_url":"https://api.github.com/users/vredara/repos","events_url":"https://api.github.com/users/vredara/events{/privacy}","received_events_url":"https://api.github.com/users/vredara/received_events","type":"User","site_admin":false},"body":"added interface to run specific cmds against gd1 and gd2\r\ngd1.go has gd1 related functions, gd2 has glusterd2 related functions\r\nglusterutils.go has interface which gd1 and gd2 has to implement\r\n\r\nSigned-off-by: venkata edara <redara@redhat.com>","created_at":"2018-10-12T03:19:58Z","updated_at":"2018-10-24T14:31:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8269cef94cb5ba99af2dca02deee8521f59d6689","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47/commits","review_comments_url":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47/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/47/comments","statuses_url":"https://api.github.com/repos/gluster/gluster-prometheus/statuses/6004d4fba9f475155d3d7231eab2bbc4390e5f25","head":{"label":"vredara:gluster-utils","ref":"gluster-utils","sha":"6004d4fba9f475155d3d7231eab2bbc4390e5f25","user":{"login":"vredara","id":25246678,"node_id":"MDQ6VXNlcjI1MjQ2Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/25246678?v=4","gravatar_id":"","url":"https://api.github.com/users/vredara","html_url":"https://github.com/vredara","followers_url":"https://api.github.com/users/vredara/followers","following_url":"https://api.github.com/users/vredara/following{/other_user}","gists_url":"https://api.github.com/users/vredara/gists{/gist_id}","starred_url":"https://api.github.com/users/vredara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vredara/subscriptions","organizations_url":"https://api.github.com/users/vredara/orgs","repos_url":"https://api.github.com/users/vredara/repos","events_url":"https://api.github.com/users/vredara/events{/privacy}","received_events_url":"https://api.github.com/users/vredara/received_events","type":"User","site_admin":false},"repo":{"id":146873376,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY4NzMzNzY=","name":"gluster-prometheus","full_name":"vredara/gluster-prometheus","private":false,"owner":{"login":"vredara","id":25246678,"node_id":"MDQ6VXNlcjI1MjQ2Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/25246678?v=4","gravatar_id":"","url":"https://api.github.com/users/vredara","html_url":"https://github.com/vredara","followers_url":"https://api.github.com/users/vredara/followers","following_url":"https://api.github.com/users/vredara/following{/other_user}","gists_url":"https://api.github.com/users/vredara/gists{/gist_id}","starred_url":"https://api.github.com/users/vredara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vredara/subscriptions","organizations_url":"https://api.github.com/users/vredara/orgs","repos_url":"https://api.github.com/users/vredara/repos","events_url":"https://api.github.com/users/vredara/events{/privacy}","received_events_url":"https://api.github.com/users/vredara/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vredara/gluster-prometheus","description":null,"fork":true,"url":"https://api.github.com/repos/vredara/gluster-prometheus","forks_url":"https://api.github.com/repos/vredara/gluster-prometheus/forks","keys_url":"https://api.github.com/repos/vredara/gluster-prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vredara/gluster-prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vredara/gluster-prometheus/teams","hooks_url":"https://api.github.com/repos/vredara/gluster-prometheus/hooks","issue_events_url":"https://api.github.com/repos/vredara/gluster-prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/vredara/gluster-prometheus/events","assignees_url":"https://api.github.com/repos/vredara/gluster-prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/vredara/gluster-prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/vredara/gluster-prometheus/tags","blobs_url":"https://api.github.com/repos/vredara/gluster-prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vredara/gluster-prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vredara/gluster-prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/vredara/gluster-prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vredara/gluster-prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/vredara/gluster-prometheus/languages","stargazers_url":"https://api.github.com/repos/vredara/gluster-prometheus/stargazers","contributors_url":"https://api.github.com/repos/vredara/gluster-prometheus/contributors","subscribers_url":"https://api.github.com/repos/vredara/gluster-prometheus/subscribers","subscription_url":"https://api.github.com/repos/vredara/gluster-prometheus/subscription","commits_url":"https://api.github.com/repos/vredara/gluster-prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/vredara/gluster-prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/vredara/gluster-prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/vredara/gluster-prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/vredara/gluster-prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/vredara/gluster-prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vredara/gluster-prometheus/merges","archive_url":"https://api.github.com/repos/vredara/gluster-prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vredara/gluster-prometheus/downloads","issues_url":"https://api.github.com/repos/vredara/gluster-prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/vredara/gluster-prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/vredara/gluster-prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/vredara/gluster-prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vredara/gluster-prometheus/labels{/name}","releases_url":"https://api.github.com/repos/vredara/gluster-prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/vredara/gluster-prometheus/deployments","created_at":"2018-08-31T09:50:13Z","updated_at":"2018-08-31T09:50:15Z","pushed_at":"2018-10-24T09:42:38Z","git_url":"git://github.com/vredara/gluster-prometheus.git","ssh_url":"git@github.com:vredara/gluster-prometheus.git","clone_url":"https://github.com/vredara/gluster-prometheus.git","svn_url":"https://github.com/vredara/gluster-prometheus","homepage":null,"size":77,"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":"51fb11d514f1785af5e4918950ab10eae5b86fc9","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","private":false,"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},"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-10-24T04:34:19Z","pushed_at":"2018-10-24T12:29:59Z","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":73,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":27,"license":null,"forks":11,"open_issues":27,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47"},"html":{"href":"https://github.com/gluster/gluster-prometheus/pull/47"},"issue":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/issues/47"},"comments":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/pulls/47/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/47/commits"},"statuses":{"href":"https://api.github.com/repos/gluster/gluster-prometheus/statuses/6004d4fba9f475155d3d7231eab2bbc4390e5f25"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"aravindavk"}}