{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/64729166","id":64729166,"diff_hunk":"@@ -0,0 +1,302 @@\n+package graylog\n+\n+import (\n+\t\"bytes\"\n+\t\"encoding/json\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"regexp\"\n+\t\"strconv\"\n+\t\"strings\"\n+\t\"sync\"\n+\t\"time\"\n+\n+\t\"github.com/influxdata/telegraf\"\n+\t\"github.com/influxdata/telegraf/internal\"\n+\t\"github.com/influxdata/telegraf/plugins/inputs\"\n+\t\"github.com/influxdata/telegraf/plugins/parsers\"\n+)\n+\n+type GrayLog struct {\n+\tName    string\n+\tServers []string\n+\tTagKeys []string\n+\tMetrics []string\n+\tHeaders map[string]string\n+\n+\t// Path to CA file\n+\tSSLCA string `toml:\"ssl_ca\"`\n+\t// Path to host cert file\n+\tSSLCert string `toml:\"ssl_cert\"`\n+\t// Path to cert key file\n+\tSSLKey string `toml:\"ssl_key\"`\n+\t// Use SSL but skip chain & host verification\n+\tInsecureSkipVerify bool\n+\n+\tclient HTTPClient\n+}\n+\n+type HTTPClient interface {\n+\t// Returns the result of an http request\n+\t//\n+\t// Parameters:\n+\t// req: HTTP request object\n+\t//\n+\t// Returns:\n+\t// http.Response:  HTTP respons object\n+\t// error        :  Any error that may have occurred\n+\tMakeRequest(req *http.Request) (*http.Response, error)\n+\n+\tSetHTTPClient(client *http.Client)\n+\tHTTPClient() *http.Client\n+}\n+\n+type Messagebody struct {\n+\tMetrics []string `json:\"metrics\"`\n+}\n+\n+type RealHTTPClient struct {\n+\tclient *http.Client\n+}\n+\n+func (c *RealHTTPClient) MakeRequest(req *http.Request) (*http.Response, error) {\n+\treturn c.client.Do(req)\n+}\n+\n+func (c *RealHTTPClient) SetHTTPClient(client *http.Client) {\n+\tc.client = client\n+}\n+\n+func (c *RealHTTPClient) HTTPClient() *http.Client {\n+\treturn c.client\n+}\n+\n+var sampleConfig = `\n+  ## NOTE This plugin only reads numerical measurements, strings and booleans\n+  ## will be ignored.\n+\n+  ## a name for the service being polled\n+  name = \"webserver_stats\"\n+\n+  ## URL of each server in the service's cluster\n+  servers = [\n+    \"http://localhost:12900/system/metrics/multipl\"\n+  ]\n+\n+\n+  ## List of tag names to extract from top-level of JSON server response\n+  # tag_keys = [\n+  #   \"my_tag_1\",\n+  #   \"my_tag_2\"\n+  # ]\n+  metrics = [","path":"plugins/inputs/graylog/graylog.go","position":95,"original_position":95,"commit_id":"045a0e9f93b0f9e9080ff75eaa8a0b74b36f1df8","original_commit_id":"045a0e9f93b0f9e9080ff75eaa8a0b74b36f1df8","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":"what does this array do?","created_at":"2016-05-26T11:18:51Z","updated_at":"2016-05-26T11:18:51Z","html_url":"https://github.com/influxdata/telegraf/pull/1261#discussion_r64729166","pull_request_url":"https://api.github.com/repos/influxdata/telegraf/pulls/1261","_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/64729166"},"html":{"href":"https://github.com/influxdata/telegraf/pull/1261#discussion_r64729166"},"pull_request":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/1261"}}},"pull_request":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/1261","id":71340466,"html_url":"https://github.com/influxdata/telegraf/pull/1261","diff_url":"https://github.com/influxdata/telegraf/pull/1261.diff","patch_url":"https://github.com/influxdata/telegraf/pull/1261.patch","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/1261","number":1261,"state":"open","locked":false,"title":"[#1262] Add Graylog input plugin","user":{"login":"alimousazy","id":3162446,"avatar_url":"https://avatars.githubusercontent.com/u/3162446?v=3","gravatar_id":"","url":"https://api.github.com/users/alimousazy","html_url":"https://github.com/alimousazy","followers_url":"https://api.github.com/users/alimousazy/followers","following_url":"https://api.github.com/users/alimousazy/following{/other_user}","gists_url":"https://api.github.com/users/alimousazy/gists{/gist_id}","starred_url":"https://api.github.com/users/alimousazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimousazy/subscriptions","organizations_url":"https://api.github.com/users/alimousazy/orgs","repos_url":"https://api.github.com/users/alimousazy/repos","events_url":"https://api.github.com/users/alimousazy/events{/privacy}","received_events_url":"https://api.github.com/users/alimousazy/received_events","type":"User","site_admin":false},"body":"### Required for all PRs:\r\n\r\n- [x] CHANGELOG.md updated\r\n- [x] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)\r\n- [x] README.md updated (if adding a new plugin)\r\n\r\n","created_at":"2016-05-25T07:11:24Z","updated_at":"2016-05-26T11:18:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34681405d3c6443f936c1db5e09cea92e789b50c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdata/telegraf/pulls/1261/commits","review_comments_url":"https://api.github.com/repos/influxdata/telegraf/pulls/1261/comments","review_comment_url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/1261/comments","statuses_url":"https://api.github.com/repos/influxdata/telegraf/statuses/045a0e9f93b0f9e9080ff75eaa8a0b74b36f1df8","head":{"label":"alimousazy:master","ref":"master","sha":"045a0e9f93b0f9e9080ff75eaa8a0b74b36f1df8","user":{"login":"alimousazy","id":3162446,"avatar_url":"https://avatars.githubusercontent.com/u/3162446?v=3","gravatar_id":"","url":"https://api.github.com/users/alimousazy","html_url":"https://github.com/alimousazy","followers_url":"https://api.github.com/users/alimousazy/followers","following_url":"https://api.github.com/users/alimousazy/following{/other_user}","gists_url":"https://api.github.com/users/alimousazy/gists{/gist_id}","starred_url":"https://api.github.com/users/alimousazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimousazy/subscriptions","organizations_url":"https://api.github.com/users/alimousazy/orgs","repos_url":"https://api.github.com/users/alimousazy/repos","events_url":"https://api.github.com/users/alimousazy/events{/privacy}","received_events_url":"https://api.github.com/users/alimousazy/received_events","type":"User","site_admin":false},"repo":{"id":59639097,"name":"telegraf","full_name":"alimousazy/telegraf","owner":{"login":"alimousazy","id":3162446,"avatar_url":"https://avatars.githubusercontent.com/u/3162446?v=3","gravatar_id":"","url":"https://api.github.com/users/alimousazy","html_url":"https://github.com/alimousazy","followers_url":"https://api.github.com/users/alimousazy/followers","following_url":"https://api.github.com/users/alimousazy/following{/other_user}","gists_url":"https://api.github.com/users/alimousazy/gists{/gist_id}","starred_url":"https://api.github.com/users/alimousazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimousazy/subscriptions","organizations_url":"https://api.github.com/users/alimousazy/orgs","repos_url":"https://api.github.com/users/alimousazy/repos","events_url":"https://api.github.com/users/alimousazy/events{/privacy}","received_events_url":"https://api.github.com/users/alimousazy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alimousazy/telegraf","description":"The plugin-driven server agent for collecting & reporting metrics.","fork":true,"url":"https://api.github.com/repos/alimousazy/telegraf","forks_url":"https://api.github.com/repos/alimousazy/telegraf/forks","keys_url":"https://api.github.com/repos/alimousazy/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alimousazy/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alimousazy/telegraf/teams","hooks_url":"https://api.github.com/repos/alimousazy/telegraf/hooks","issue_events_url":"https://api.github.com/repos/alimousazy/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/alimousazy/telegraf/events","assignees_url":"https://api.github.com/repos/alimousazy/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/alimousazy/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/alimousazy/telegraf/tags","blobs_url":"https://api.github.com/repos/alimousazy/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alimousazy/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alimousazy/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/alimousazy/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alimousazy/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/alimousazy/telegraf/languages","stargazers_url":"https://api.github.com/repos/alimousazy/telegraf/stargazers","contributors_url":"https://api.github.com/repos/alimousazy/telegraf/contributors","subscribers_url":"https://api.github.com/repos/alimousazy/telegraf/subscribers","subscription_url":"https://api.github.com/repos/alimousazy/telegraf/subscription","commits_url":"https://api.github.com/repos/alimousazy/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/alimousazy/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/alimousazy/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/alimousazy/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/alimousazy/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/alimousazy/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alimousazy/telegraf/merges","archive_url":"https://api.github.com/repos/alimousazy/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alimousazy/telegraf/downloads","issues_url":"https://api.github.com/repos/alimousazy/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/alimousazy/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/alimousazy/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/alimousazy/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alimousazy/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/alimousazy/telegraf/releases{/id}","deployments_url":"https://api.github.com/repos/alimousazy/telegraf/deployments","created_at":"2016-05-25T07:03:09Z","updated_at":"2016-05-25T07:03:13Z","pushed_at":"2016-05-25T21:44:03Z","git_url":"git://github.com/alimousazy/telegraf.git","ssh_url":"git@github.com:alimousazy/telegraf.git","clone_url":"https://github.com/alimousazy/telegraf.git","svn_url":"https://github.com/alimousazy/telegraf","homepage":"","size":10742,"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":"influxdata:master","ref":"master","sha":"a8334c32613cc4f0af99ad4e89ec33476c299187","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":33258973,"name":"telegraf","full_name":"influxdata/telegraf","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/telegraf","description":"The plugin-driven server agent for collecting & reporting metrics.","fork":false,"url":"https://api.github.com/repos/influxdata/telegraf","forks_url":"https://api.github.com/repos/influxdata/telegraf/forks","keys_url":"https://api.github.com/repos/influxdata/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/telegraf/teams","hooks_url":"https://api.github.com/repos/influxdata/telegraf/hooks","issue_events_url":"https://api.github.com/repos/influxdata/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/telegraf/events","assignees_url":"https://api.github.com/repos/influxdata/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/telegraf/tags","blobs_url":"https://api.github.com/repos/influxdata/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/telegraf/languages","stargazers_url":"https://api.github.com/repos/influxdata/telegraf/stargazers","contributors_url":"https://api.github.com/repos/influxdata/telegraf/contributors","subscribers_url":"https://api.github.com/repos/influxdata/telegraf/subscribers","subscription_url":"https://api.github.com/repos/influxdata/telegraf/subscription","commits_url":"https://api.github.com/repos/influxdata/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/telegraf/merges","archive_url":"https://api.github.com/repos/influxdata/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/telegraf/downloads","issues_url":"https://api.github.com/repos/influxdata/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/telegraf/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/telegraf/deployments","created_at":"2015-04-01T16:28:44Z","updated_at":"2016-05-26T09:14:30Z","pushed_at":"2016-05-26T11:15:32Z","git_url":"git://github.com/influxdata/telegraf.git","ssh_url":"git@github.com:influxdata/telegraf.git","clone_url":"https://github.com/influxdata/telegraf.git","svn_url":"https://github.com/influxdata/telegraf","homepage":"","size":24897,"stargazers_count":1387,"watchers_count":1387,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":115,"forks":429,"open_issues":115,"watchers":1387,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/1261"},"html":{"href":"https://github.com/influxdata/telegraf/pull/1261"},"issue":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/1261"},"comments":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/1261/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/1261/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/1261/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/telegraf/statuses/045a0e9f93b0f9e9080ff75eaa8a0b74b36f1df8"}}}}
{"actor":{"display_login":"sparrc"}}