{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/98441394","pull_request_review_id":19081578,"id":98441394,"diff_hunk":"@@ -0,0 +1,246 @@\n+package elasticsearch\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\t\"log\"\n+\t\"strconv\"\n+\t\"strings\"\n+\t\"time\"\n+\n+\t\"github.com/influxdata/telegraf\"\n+\t\"github.com/influxdata/telegraf/plugins/outputs\"\n+\t\"gopkg.in/olivere/elastic.v5\"\n+)\n+\n+type Elasticsearch struct {\n+\tURLs                []string `toml:\"urls\"`\n+\tIndexName           string\n+\tUsername            string\n+\tPassword            string\n+\tEnableSniffer       bool\n+\tHealthCheckInterval int\n+\tManageTemplate      bool\n+\tTemplateName        string\n+\tOverwriteTemplate   bool\n+\tClient              *elastic.Client\n+}\n+\n+var sampleConfig = `\n+  ## The full HTTP endpoint URL for your Elasticsearch instance\n+  ## Multiple urls can be specified as part of the same cluster,\n+  ## this means that only ONE of the urls will be written to each interval.\n+  urls = [ \"http://node1.es.example.com:9200\" ] # required.\n+  ## Set to true to ask Elasticsearch a list of all cluster nodes,\n+  ## thus it is not necessary to list all nodes in the urls config option\n+  enable_sniffer = true\n+  ## Set the interval to check if the nodes are available, in seconds\n+  ## Setting to 0 will disable the health check (not recommended in production)\n+  health_check_interval = 10\n+  ## HTTP basic authentication details (eg. when using Shield)\n+  # username = \"telegraf\"\n+  # password = \"mypassword\"\n+\n+  # Index Config","path":"plugins/outputs/elasticsearch/elasticsearch.go","position":44,"original_position":44,"commit_id":"e0ebc3435973f4a3bc9224983fdf3aaa4ab425e2","original_commit_id":"648e50b710cf93eb40a2855c13ea99c465ffc378","user":{"login":"lpic10","id":11616752,"avatar_url":"https://avatars.githubusercontent.com/u/11616752?v=3","gravatar_id":"","url":"https://api.github.com/users/lpic10","html_url":"https://github.com/lpic10","followers_url":"https://api.github.com/users/lpic10/followers","following_url":"https://api.github.com/users/lpic10/following{/other_user}","gists_url":"https://api.github.com/users/lpic10/gists{/gist_id}","starred_url":"https://api.github.com/users/lpic10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpic10/subscriptions","organizations_url":"https://api.github.com/users/lpic10/orgs","repos_url":"https://api.github.com/users/lpic10/repos","events_url":"https://api.github.com/users/lpic10/events{/privacy}","received_events_url":"https://api.github.com/users/lpic10/received_events","type":"User","site_admin":false},"body":"I've added additional information, let me know if it is enough. ","created_at":"2017-01-30T13:37:20Z","updated_at":"2017-01-30T13:37:20Z","html_url":"https://github.com/influxdata/telegraf/pull/2332#discussion_r98441394","pull_request_url":"https://api.github.com/repos/influxdata/telegraf/pulls/2332","_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments/98441394"},"html":{"href":"https://github.com/influxdata/telegraf/pull/2332#discussion_r98441394"},"pull_request":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/2332"}}},"pull_request":{"url":"https://api.github.com/repos/influxdata/telegraf/pulls/2332","id":103559816,"html_url":"https://github.com/influxdata/telegraf/pull/2332","diff_url":"https://github.com/influxdata/telegraf/pull/2332.diff","patch_url":"https://github.com/influxdata/telegraf/pull/2332.patch","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/2332","number":2332,"state":"open","locked":false,"title":"Add Elasticsearch 5.x output","user":{"login":"lpic10","id":11616752,"avatar_url":"https://avatars.githubusercontent.com/u/11616752?v=3","gravatar_id":"","url":"https://api.github.com/users/lpic10","html_url":"https://github.com/lpic10","followers_url":"https://api.github.com/users/lpic10/followers","following_url":"https://api.github.com/users/lpic10/following{/other_user}","gists_url":"https://api.github.com/users/lpic10/gists{/gist_id}","starred_url":"https://api.github.com/users/lpic10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpic10/subscriptions","organizations_url":"https://api.github.com/users/lpic10/orgs","repos_url":"https://api.github.com/users/lpic10/repos","events_url":"https://api.github.com/users/lpic10/events{/privacy}","received_events_url":"https://api.github.com/users/lpic10/received_events","type":"User","site_admin":false},"body":"This PR is based on #1875 with several changes:\r\n\r\n- It supports only ES 5.x\r\n- Management of shards/replicas removed  \r\n- A list of hosts to connect can now be used (similar to influxdb config)\r\n- Allows a bit better template management\r\n- Index name per time frame is now working properly, based on the metric timestamp\r\n- Tags are now keyword fields inside a tag object \r\n- Metrics are now fields inside an object named as the input plugin\r\n- Basic HTTP auth support (not tested)\r\n- Uses ES bulk API for indexing\r\n\r\nComments/reviews are welcome\r\n\r\n### Required for all PRs:\r\n\r\n- [ ] CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)\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","created_at":"2017-01-27T20:20:55Z","updated_at":"2017-01-30T13:37:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"383e8f13c1d34edb3d504afcf2fc662ac2e7bace","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/influxdata/telegraf/pulls/2332/commits","review_comments_url":"https://api.github.com/repos/influxdata/telegraf/pulls/2332/comments","review_comment_url":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/2332/comments","statuses_url":"https://api.github.com/repos/influxdata/telegraf/statuses/e0ebc3435973f4a3bc9224983fdf3aaa4ab425e2","head":{"label":"lpic10:es_support","ref":"es_support","sha":"e0ebc3435973f4a3bc9224983fdf3aaa4ab425e2","user":{"login":"lpic10","id":11616752,"avatar_url":"https://avatars.githubusercontent.com/u/11616752?v=3","gravatar_id":"","url":"https://api.github.com/users/lpic10","html_url":"https://github.com/lpic10","followers_url":"https://api.github.com/users/lpic10/followers","following_url":"https://api.github.com/users/lpic10/following{/other_user}","gists_url":"https://api.github.com/users/lpic10/gists{/gist_id}","starred_url":"https://api.github.com/users/lpic10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpic10/subscriptions","organizations_url":"https://api.github.com/users/lpic10/orgs","repos_url":"https://api.github.com/users/lpic10/repos","events_url":"https://api.github.com/users/lpic10/events{/privacy}","received_events_url":"https://api.github.com/users/lpic10/received_events","type":"User","site_admin":false},"repo":{"id":80237788,"name":"telegraf","full_name":"lpic10/telegraf","owner":{"login":"lpic10","id":11616752,"avatar_url":"https://avatars.githubusercontent.com/u/11616752?v=3","gravatar_id":"","url":"https://api.github.com/users/lpic10","html_url":"https://github.com/lpic10","followers_url":"https://api.github.com/users/lpic10/followers","following_url":"https://api.github.com/users/lpic10/following{/other_user}","gists_url":"https://api.github.com/users/lpic10/gists{/gist_id}","starred_url":"https://api.github.com/users/lpic10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpic10/subscriptions","organizations_url":"https://api.github.com/users/lpic10/orgs","repos_url":"https://api.github.com/users/lpic10/repos","events_url":"https://api.github.com/users/lpic10/events{/privacy}","received_events_url":"https://api.github.com/users/lpic10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lpic10/telegraf","description":"The plugin-driven server agent for collecting & reporting metrics.","fork":true,"url":"https://api.github.com/repos/lpic10/telegraf","forks_url":"https://api.github.com/repos/lpic10/telegraf/forks","keys_url":"https://api.github.com/repos/lpic10/telegraf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lpic10/telegraf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lpic10/telegraf/teams","hooks_url":"https://api.github.com/repos/lpic10/telegraf/hooks","issue_events_url":"https://api.github.com/repos/lpic10/telegraf/issues/events{/number}","events_url":"https://api.github.com/repos/lpic10/telegraf/events","assignees_url":"https://api.github.com/repos/lpic10/telegraf/assignees{/user}","branches_url":"https://api.github.com/repos/lpic10/telegraf/branches{/branch}","tags_url":"https://api.github.com/repos/lpic10/telegraf/tags","blobs_url":"https://api.github.com/repos/lpic10/telegraf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lpic10/telegraf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lpic10/telegraf/git/refs{/sha}","trees_url":"https://api.github.com/repos/lpic10/telegraf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lpic10/telegraf/statuses/{sha}","languages_url":"https://api.github.com/repos/lpic10/telegraf/languages","stargazers_url":"https://api.github.com/repos/lpic10/telegraf/stargazers","contributors_url":"https://api.github.com/repos/lpic10/telegraf/contributors","subscribers_url":"https://api.github.com/repos/lpic10/telegraf/subscribers","subscription_url":"https://api.github.com/repos/lpic10/telegraf/subscription","commits_url":"https://api.github.com/repos/lpic10/telegraf/commits{/sha}","git_commits_url":"https://api.github.com/repos/lpic10/telegraf/git/commits{/sha}","comments_url":"https://api.github.com/repos/lpic10/telegraf/comments{/number}","issue_comment_url":"https://api.github.com/repos/lpic10/telegraf/issues/comments{/number}","contents_url":"https://api.github.com/repos/lpic10/telegraf/contents/{+path}","compare_url":"https://api.github.com/repos/lpic10/telegraf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lpic10/telegraf/merges","archive_url":"https://api.github.com/repos/lpic10/telegraf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lpic10/telegraf/downloads","issues_url":"https://api.github.com/repos/lpic10/telegraf/issues{/number}","pulls_url":"https://api.github.com/repos/lpic10/telegraf/pulls{/number}","milestones_url":"https://api.github.com/repos/lpic10/telegraf/milestones{/number}","notifications_url":"https://api.github.com/repos/lpic10/telegraf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lpic10/telegraf/labels{/name}","releases_url":"https://api.github.com/repos/lpic10/telegraf/releases{/id}","deployments_url":"https://api.github.com/repos/lpic10/telegraf/deployments","created_at":"2017-01-27T19:15:11Z","updated_at":"2017-01-27T19:15:16Z","pushed_at":"2017-01-28T15:59:44Z","git_url":"git://github.com/lpic10/telegraf.git","ssh_url":"git@github.com:lpic10/telegraf.git","clone_url":"https://github.com/lpic10/telegraf.git","svn_url":"https://github.com/lpic10/telegraf","homepage":"","size":12441,"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":"c9e87a39f8129aa7aacf45a6342d781f50be69fa","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":"2017-01-30T13:29:16Z","pushed_at":"2017-01-30T12:04:20Z","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":12499,"stargazers_count":2330,"watchers_count":2330,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":827,"mirror_url":null,"open_issues_count":322,"forks":827,"open_issues":322,"watchers":2330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/2332"},"html":{"href":"https://github.com/influxdata/telegraf/pull/2332"},"issue":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/2332"},"comments":{"href":"https://api.github.com/repos/influxdata/telegraf/issues/2332/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/2332/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/telegraf/pulls/2332/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/telegraf/statuses/e0ebc3435973f4a3bc9224983fdf3aaa4ab425e2"}}}}
{"actor":{"display_login":"lpic10"}}