{"action":"created","comment":{"url":"https://api.github.com/repos/influxdb/telegraf/pulls/comments/40110388","id":40110388,"diff_hunk":"@@ -134,13 +134,11 @@ func (n *Apache) gatherScores(data string, acc plugins.Accumulator, tags map[str\n // Get tag(s) for the apache plugin\n func getTags(addr *url.URL) map[string]string {\n \th := addr.Host\n-\tvar htag string\n-\tif host, _, err := net.SplitHostPort(h); err == nil {\n-\t\thtag = host\n+\tif host, port, err := net.SplitHostPort(h); err == nil {\n+\t\treturn map[string]string{\"server\": host, \"port\": port}\n \t} else {\n-\t\thtag = h\n+\t\treturn map[string]string{\"server\": h, \"port\": \"80\"}","path":"plugins/apache/apache.go","position":11,"original_position":11,"commit_id":"05804230b49f30737f29f553bd4c90b047920cd1","original_commit_id":"05804230b49f30737f29f553bd4c90b047920cd1","user":{"login":"sparrc","id":7155926,"avatar_url":"https://avatars.githubusercontent.com/u/7155926?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrc","html_url":"https://github.com/sparrc","followers_url":"https://api.github.com/users/sparrc/followers","following_url":"https://api.github.com/users/sparrc/following{/other_user}","gists_url":"https://api.github.com/users/sparrc/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrc/subscriptions","organizations_url":"https://api.github.com/users/sparrc/orgs","repos_url":"https://api.github.com/users/sparrc/repos","events_url":"https://api.github.com/users/sparrc/events{/privacy}","received_events_url":"https://api.github.com/users/sparrc/received_events","type":"User","site_admin":false},"body":"that, or check for https at the beginning of the string and use port 443 if it's there","created_at":"2015-09-22T16:44:31Z","updated_at":"2015-09-22T16:44:31Z","html_url":"https://github.com/influxdb/telegraf/pull/220#discussion_r40110388","pull_request_url":"https://api.github.com/repos/influxdb/telegraf/pulls/220","_links":{"self":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/comments/40110388"},"html":{"href":"https://github.com/influxdb/telegraf/pull/220#discussion_r40110388"},"pull_request":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/220"}}},"pull_request":{"url":"https://api.github.com/repos/influxdb/telegraf/pulls/220","id":45685032,"html_url":"https://github.com/influxdb/telegraf/pull/220","diff_url":"https://github.com/influxdb/telegraf/pull/220.diff","patch_url":"https://github.com/influxdb/telegraf/pull/220.patch","issue_url":"https://api.github.com/repos/influxdb/telegraf/issues/220","number":220,"state":"open","locked":false,"title":"Add port tag to apache plugin","user":{"login":"neezgee","id":3996145,"avatar_url":"https://avatars.githubusercontent.com/u/3996145?v=3","gravatar_id":"","url":"https://api.github.com/users/neezgee","html_url":"https://github.com/neezgee","followers_url":"https://api.github.com/users/neezgee/followers","following_url":"https://api.github.com/users/neezgee/following{/other_user}","gists_url":"https://api.github.com/users/neezgee/gists{/gist_id}","starred_url":"https://api.github.com/users/neezgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neezgee/subscriptions","organizations_url":"https://api.github.com/users/neezgee/orgs","repos_url":"https://api.github.com/users/neezgee/repos","events_url":"https://api.github.com/users/neezgee/events{/privacy}","received_events_url":"https://api.github.com/users/neezgee/received_events","type":"User","site_admin":false},"body":"I need to monitor several apache instances on single host. Port number is only way of distinguishing them.","created_at":"2015-09-22T16:22:10Z","updated_at":"2015-09-22T16:44:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e61cbdbf572b77c79fc4528712be953cdec0e8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdb/telegraf/pulls/220/commits","review_comments_url":"https://api.github.com/repos/influxdb/telegraf/pulls/220/comments","review_comment_url":"https://api.github.com/repos/influxdb/telegraf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdb/telegraf/issues/220/comments","statuses_url":"https://api.github.com/repos/influxdb/telegraf/statuses/05804230b49f30737f29f553bd4c90b047920cd1","head":{"label":"neezgee:master","ref":"master","sha":"05804230b49f30737f29f553bd4c90b047920cd1","user":{"login":"neezgee","id":3996145,"avatar_url":"https://avatars.githubusercontent.com/u/3996145?v=3","gravatar_id":"","url":"https://api.github.com/users/neezgee","html_url":"https://github.com/neezgee","followers_url":"https://api.github.com/users/neezgee/followers","following_url":"https://api.github.com/users/neezgee/following{/other_user}","gists_url":"https://api.github.com/users/neezgee/gists{/gist_id}","starred_url":"https://api.github.com/users/neezgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neezgee/subscriptions","organizations_url":"https://api.github.com/users/neezgee/orgs","repos_url":"https://api.github.com/users/neezgee/repos","events_url":"https://api.github.com/users/neezgee/events{/privacy}","received_events_url":"https://api.github.com/users/neezgee/received_events","type":"User","site_admin":false},"repo":{"id":42938196,"name":"telegraf","full_name":"neezgee/telegraf","owner":{"login":"neezgee","id":3996145,"avatar_url":"https://avatars.githubusercontent.com/u/3996145?v=3","gravatar_id":"","url":"https://api.github.com/users/neezgee","html_url":"https://github.com/neezgee","followers_url":"https://api.github.com/users/neezgee/followers","following_url":"https://api.github.com/users/neezgee/following{/other_user}","gists_url":"https://api.github.com/users/neezgee/gists{/gist_id}","starred_url":"https://api.github.com/users/neezgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neezgee/subscriptions","organizations_url":"https://api.github.com/users/neezgee/orgs","repos_url":"https://api.github.com/users/neezgee/repos","events_url":"https://api.github.com/users/neezgee/events{/privacy}","received_events_url":"https://api.github.com/users/neezgee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neezgee/telegraf","description":"The plugin-driven server agent for reporting metrics into InfluxDB.","fork":true,"url":"https://api.github.com/repos/neezgee/telegraf","forks_url":"https://api.github.com/repos/neezgee/telegraf/forks","keys_url":"https://api.github.com/repos/neezgee/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neezgee/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neezgee/telegraf/teams","hooks_url":"https://api.github.com/repos/neezgee/telegraf/hooks","issue_events_url":"https://api.github.com/repos/neezgee/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/neezgee/telegraf/events","assignees_url":"https://api.github.com/repos/neezgee/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/neezgee/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/neezgee/telegraf/tags","blobs_url":"https://api.github.com/repos/neezgee/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neezgee/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neezgee/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/neezgee/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neezgee/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/neezgee/telegraf/languages","stargazers_url":"https://api.github.com/repos/neezgee/telegraf/stargazers","contributors_url":"https://api.github.com/repos/neezgee/telegraf/contributors","subscribers_url":"https://api.github.com/repos/neezgee/telegraf/subscribers","subscription_url":"https://api.github.com/repos/neezgee/telegraf/subscription","commits_url":"https://api.github.com/repos/neezgee/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/neezgee/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/neezgee/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/neezgee/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/neezgee/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/neezgee/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neezgee/telegraf/merges","archive_url":"https://api.github.com/repos/neezgee/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neezgee/telegraf/downloads","issues_url":"https://api.github.com/repos/neezgee/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/neezgee/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/neezgee/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/neezgee/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neezgee/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/neezgee/telegraf/releases{/id}","created_at":"2015-09-22T14:16:44Z","updated_at":"2015-09-22T14:16:46Z","pushed_at":"2015-09-22T16:19:28Z","git_url":"git://github.com/neezgee/telegraf.git","ssh_url":"git@github.com:neezgee/telegraf.git","clone_url":"https://github.com/neezgee/telegraf.git","svn_url":"https://github.com/neezgee/telegraf","homepage":"","size":8847,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"influxdb:master","ref":"master","sha":"1cd2db9f8c55e56addba568fd2f4943056d46185","user":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"repo":{"id":33258973,"name":"telegraf","full_name":"influxdb/telegraf","owner":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdb/telegraf","description":"The plugin-driven server agent for reporting metrics into InfluxDB.","fork":false,"url":"https://api.github.com/repos/influxdb/telegraf","forks_url":"https://api.github.com/repos/influxdb/telegraf/forks","keys_url":"https://api.github.com/repos/influxdb/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdb/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdb/telegraf/teams","hooks_url":"https://api.github.com/repos/influxdb/telegraf/hooks","issue_events_url":"https://api.github.com/repos/influxdb/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdb/telegraf/events","assignees_url":"https://api.github.com/repos/influxdb/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdb/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdb/telegraf/tags","blobs_url":"https://api.github.com/repos/influxdb/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdb/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdb/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdb/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdb/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdb/telegraf/languages","stargazers_url":"https://api.github.com/repos/influxdb/telegraf/stargazers","contributors_url":"https://api.github.com/repos/influxdb/telegraf/contributors","subscribers_url":"https://api.github.com/repos/influxdb/telegraf/subscribers","subscription_url":"https://api.github.com/repos/influxdb/telegraf/subscription","commits_url":"https://api.github.com/repos/influxdb/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdb/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdb/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdb/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdb/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdb/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdb/telegraf/merges","archive_url":"https://api.github.com/repos/influxdb/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdb/telegraf/downloads","issues_url":"https://api.github.com/repos/influxdb/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdb/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdb/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdb/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdb/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/influxdb/telegraf/releases{/id}","created_at":"2015-04-01T16:28:44Z","updated_at":"2015-09-22T09:20:10Z","pushed_at":"2015-09-22T16:28:57Z","git_url":"git://github.com/influxdb/telegraf.git","ssh_url":"git@github.com:influxdb/telegraf.git","clone_url":"https://github.com/influxdb/telegraf.git","svn_url":"https://github.com/influxdb/telegraf","homepage":"","size":8847,"stargazers_count":478,"watchers_count":478,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":32,"forks":82,"open_issues":32,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/220"},"html":{"href":"https://github.com/influxdb/telegraf/pull/220"},"issue":{"href":"https://api.github.com/repos/influxdb/telegraf/issues/220"},"comments":{"href":"https://api.github.com/repos/influxdb/telegraf/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdb/telegraf/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/influxdb/telegraf/statuses/05804230b49f30737f29f553bd4c90b047920cd1"}}}}