{"action":"created","comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/comments/33805655","id":33805655,"diff_hunk":"@@ -0,0 +1,26 @@\n+input {\n+  http_poller {\n+    urls => {","path":"examples/local_elasticsearch.conf","position":3,"original_position":3,"commit_id":"3e236aa132552fd5cf8f08613f82c9d3abb01d13","original_commit_id":"8551552c2404879c9800768a0aabca4adb5e5b35","user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"body":"It's been years since I've done a :validate lambda. Looking at [the current code](https://github.com/elastic/logstash/blob/master/lib/logstash/config/mixin.rb#L340-L482), I'm not even sure lambdas are supported anymore, haha :(\r\n\r\nAlternate validation is possible in the plugin register (or initialize) methods with custom code.  One example of this is in the [elasticsearch output](https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/master/lib/logstash/outputs/elasticsearch.rb#L323-L345)","created_at":"2015-07-02T18:07:54Z","updated_at":"2015-07-02T18:07:54Z","html_url":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17#discussion_r33805655","pull_request_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/comments/33805655"},"html":{"href":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17#discussion_r33805655"},"pull_request":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17","id":39100970,"html_url":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17","diff_url":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17.diff","patch_url":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/17","number":17,"state":"open","locked":false,"title":"Rich requests","user":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"body":"This supports a rich request syntax\r\n\r\nYou can now specify complex requests in addition to simple ones. For example\r\n\r\n```\r\ninput {\r\n  http_poller {\r\n    urls => {\r\n      test1 => \"http://localhost:9200\"\r\n      test2 => {\r\n        # Supports all options supported by ruby's Manticore HTTP client\r\n        method => get\r\n        url => \"http://localhost:9200/_cluster/health\"\r\n        headers => {\r\n          Accept => \"application/json\"\r\n        }\r\n      }\r\n    }\r\n    request_timeout => 60\r\n    interval => 60\r\n    codec => \"json\"\r\n    # A hash of request metadata info (timing, response headers, etc.) will be sent here\r\n    metadata_target => \"_http_poller_metadata\"\r\n  }\r\n}\r\n```\r\n\r\n\r\nFixes https://github.com/logstash-plugins/logstash-input-http_poller/issues/5\r\nAs well as https://github.com/logstash-plugins/logstash-input-http_poller/issues/4","created_at":"2015-07-02T16:25:40Z","updated_at":"2015-07-02T18:07:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bfbb5acb48e413d1eac342173219d6d94850c1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/17/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/statuses/3e236aa132552fd5cf8f08613f82c9d3abb01d13","head":{"label":"andrewvc:rich-requests","ref":"rich-requests","sha":"3e236aa132552fd5cf8f08613f82c9d3abb01d13","user":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"repo":{"id":38275689,"name":"logstash-input-http_poller","full_name":"andrewvc/logstash-input-http_poller","owner":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewvc/logstash-input-http_poller","description":"Create Logstash events by polling HTTP endpoints!","fork":true,"url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller","forks_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/forks","keys_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/teams","hooks_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/hooks","issue_events_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/issues/events{/number}","events_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/events","assignees_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/assignees{/user}","branches_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/branches{/branch}","tags_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/tags","blobs_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/languages","stargazers_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/stargazers","contributors_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/contributors","subscribers_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/subscribers","subscription_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/subscription","commits_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/contents/{+path}","compare_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/merges","archive_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/downloads","issues_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/issues{/number}","pulls_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/labels{/name}","releases_url":"https://api.github.com/repos/andrewvc/logstash-input-http_poller/releases{/id}","created_at":"2015-06-29T23:03:21Z","updated_at":"2015-06-29T23:03:21Z","pushed_at":"2015-07-02T18:02:20Z","git_url":"git://github.com/andrewvc/logstash-input-http_poller.git","ssh_url":"git@github.com:andrewvc/logstash-input-http_poller.git","clone_url":"https://github.com/andrewvc/logstash-input-http_poller.git","svn_url":"https://github.com/andrewvc/logstash-input-http_poller","homepage":null,"size":109,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"logstash-plugins:master","ref":"master","sha":"23a2fdab2e10cc4f44a69c494a94708e494b89a7","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":38002470,"name":"logstash-input-http_poller","full_name":"logstash-plugins/logstash-input-http_poller","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-input-http_poller","description":"Create Logstash events by polling HTTP endpoints!","fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/releases{/id}","created_at":"2015-06-24T18:13:19Z","updated_at":"2015-06-29T14:37:07Z","pushed_at":"2015-07-02T18:02:20Z","git_url":"git://github.com/logstash-plugins/logstash-input-http_poller.git","ssh_url":"git@github.com:logstash-plugins/logstash-input-http_poller.git","clone_url":"https://github.com/logstash-plugins/logstash-input-http_poller.git","svn_url":"https://github.com/logstash-plugins/logstash-input-http_poller","homepage":null,"size":270,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17"},"html":{"href":"https://github.com/logstash-plugins/logstash-input-http_poller/pull/17"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/17"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-http_poller/statuses/3e236aa132552fd5cf8f08613f82c9d3abb01d13"}}}}