{"action":"created","comment":{"url":"https://api.github.com/repos/nbrownus/streamstash/pulls/comments/105562765","pull_request_review_id":26449478,"id":105562765,"diff_hunk":"@@ -0,0 +1,68 @@\n+/**\n+ * Takes input from stdin and outputs event objects to stdout\n+ *\n+ * Try it by running\n+ *\n+ *      ./bin/streamstash examples/basic.js\n+ *\n+ * Type a message and hit enter\n+ */\n+\n+//Pause all inputs if the number of in process events exceeds the highWatermark\n+streamStash.highWaterMark = 1000\n+\n+//Unpause all inputs after the number of in process events drops below lowWatermark\n+streamStash.lowWatermark = 100\n+\n+addInputPlugin('stdin')\n+\n+addOutputPlugin( 'elasticsearch',\n+    {\n+        batchSize: 1,\n+        name: 'main-es',\n+        client: {\n+            host: 'http://localhost:9200',\n+            log: 'trace'\n+        },\n+        options: {\n+            _source: false\n+        }\n+    }\n+);\n+\n+addFilter(function (event) {\n+    // parsers is a global object containing all parsers built into StreamStash\n+    // If the parser fails event.data will contain `@type` set to 'unparseable' and `parseError` will be\n+    // the reason the parser failed\n+    // If the parser succeeds the original message will be backed up in event.data.originalMessage\n+    // The third argument controls whether or not the original message is backed up,\n+    // set it to false or don't provide it to disable the feature\n+    if (!parsers.jsonParser(event, '@type', true)) {\n+        return event.done()\n+    }\n+","path":"examples/elastic_basic.js","position":43,"original_position":43,"commit_id":"160633363698eafa42c14dbc17f3802519514323","original_commit_id":"160633363698eafa42c14dbc17f3802519514323","user":{"login":"yomashExpel","id":25300754,"avatar_url":"https://avatars0.githubusercontent.com/u/25300754?v=3","gravatar_id":"","url":"https://api.github.com/users/yomashExpel","html_url":"https://github.com/yomashExpel","followers_url":"https://api.github.com/users/yomashExpel/followers","following_url":"https://api.github.com/users/yomashExpel/following{/other_user}","gists_url":"https://api.github.com/users/yomashExpel/gists{/gist_id}","starred_url":"https://api.github.com/users/yomashExpel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomashExpel/subscriptions","organizations_url":"https://api.github.com/users/yomashExpel/orgs","repos_url":"https://api.github.com/users/yomashExpel/repos","events_url":"https://api.github.com/users/yomashExpel/events{/privacy}","received_events_url":"https://api.github.com/users/yomashExpel/received_events","type":"User","site_admin":false},"body":"specify bulk actions here versus in the Elasticoutput, provides more flexibility without having to map various options to the Elasticoutput.","created_at":"2017-03-12T17:04:36Z","updated_at":"2017-03-12T17:04:36Z","html_url":"https://github.com/nbrownus/streamstash/pull/9#discussion_r105562765","pull_request_url":"https://api.github.com/repos/nbrownus/streamstash/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/comments/105562765"},"html":{"href":"https://github.com/nbrownus/streamstash/pull/9#discussion_r105562765"},"pull_request":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/nbrownus/streamstash/pulls/9","id":110306031,"html_url":"https://github.com/nbrownus/streamstash/pull/9","diff_url":"https://github.com/nbrownus/streamstash/pull/9.diff","patch_url":"https://github.com/nbrownus/streamstash/pull/9.patch","issue_url":"https://api.github.com/repos/nbrownus/streamstash/issues/9","number":9,"state":"open","locked":false,"title":"inital commit: use offical elastic JS client, refactor ability to spe…","user":{"login":"yomashExpel","id":25300754,"avatar_url":"https://avatars0.githubusercontent.com/u/25300754?v=3","gravatar_id":"","url":"https://api.github.com/users/yomashExpel","html_url":"https://github.com/yomashExpel","followers_url":"https://api.github.com/users/yomashExpel/followers","following_url":"https://api.github.com/users/yomashExpel/following{/other_user}","gists_url":"https://api.github.com/users/yomashExpel/gists{/gist_id}","starred_url":"https://api.github.com/users/yomashExpel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomashExpel/subscriptions","organizations_url":"https://api.github.com/users/yomashExpel/orgs","repos_url":"https://api.github.com/users/yomashExpel/repos","events_url":"https://api.github.com/users/yomashExpel/events{/privacy}","received_events_url":"https://api.github.com/users/yomashExpel/received_events","type":"User","site_admin":false},"body":"…cify bulk options and to be more generic.","created_at":"2017-03-12T17:02:00Z","updated_at":"2017-03-12T17:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a297f6ac0e4941e1f34ab07da84ed5f366182135","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nbrownus/streamstash/pulls/9/commits","review_comments_url":"https://api.github.com/repos/nbrownus/streamstash/pulls/9/comments","review_comment_url":"https://api.github.com/repos/nbrownus/streamstash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nbrownus/streamstash/issues/9/comments","statuses_url":"https://api.github.com/repos/nbrownus/streamstash/statuses/160633363698eafa42c14dbc17f3802519514323","head":{"label":"yomashExpel:2.0","ref":"2.0","sha":"160633363698eafa42c14dbc17f3802519514323","user":{"login":"yomashExpel","id":25300754,"avatar_url":"https://avatars0.githubusercontent.com/u/25300754?v=3","gravatar_id":"","url":"https://api.github.com/users/yomashExpel","html_url":"https://github.com/yomashExpel","followers_url":"https://api.github.com/users/yomashExpel/followers","following_url":"https://api.github.com/users/yomashExpel/following{/other_user}","gists_url":"https://api.github.com/users/yomashExpel/gists{/gist_id}","starred_url":"https://api.github.com/users/yomashExpel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomashExpel/subscriptions","organizations_url":"https://api.github.com/users/yomashExpel/orgs","repos_url":"https://api.github.com/users/yomashExpel/repos","events_url":"https://api.github.com/users/yomashExpel/events{/privacy}","received_events_url":"https://api.github.com/users/yomashExpel/received_events","type":"User","site_admin":false},"repo":{"id":84487903,"name":"streamstash","full_name":"yomashExpel/streamstash","owner":{"login":"yomashExpel","id":25300754,"avatar_url":"https://avatars0.githubusercontent.com/u/25300754?v=3","gravatar_id":"","url":"https://api.github.com/users/yomashExpel","html_url":"https://github.com/yomashExpel","followers_url":"https://api.github.com/users/yomashExpel/followers","following_url":"https://api.github.com/users/yomashExpel/following{/other_user}","gists_url":"https://api.github.com/users/yomashExpel/gists{/gist_id}","starred_url":"https://api.github.com/users/yomashExpel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomashExpel/subscriptions","organizations_url":"https://api.github.com/users/yomashExpel/orgs","repos_url":"https://api.github.com/users/yomashExpel/repos","events_url":"https://api.github.com/users/yomashExpel/events{/privacy}","received_events_url":"https://api.github.com/users/yomashExpel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yomashExpel/streamstash","description":"Log aggregating, filtering, redirecting service","fork":true,"url":"https://api.github.com/repos/yomashExpel/streamstash","forks_url":"https://api.github.com/repos/yomashExpel/streamstash/forks","keys_url":"https://api.github.com/repos/yomashExpel/streamstash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yomashExpel/streamstash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yomashExpel/streamstash/teams","hooks_url":"https://api.github.com/repos/yomashExpel/streamstash/hooks","issue_events_url":"https://api.github.com/repos/yomashExpel/streamstash/issues/events{/number}","events_url":"https://api.github.com/repos/yomashExpel/streamstash/events","assignees_url":"https://api.github.com/repos/yomashExpel/streamstash/assignees{/user}","branches_url":"https://api.github.com/repos/yomashExpel/streamstash/branches{/branch}","tags_url":"https://api.github.com/repos/yomashExpel/streamstash/tags","blobs_url":"https://api.github.com/repos/yomashExpel/streamstash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yomashExpel/streamstash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yomashExpel/streamstash/git/refs{/sha}","trees_url":"https://api.github.com/repos/yomashExpel/streamstash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yomashExpel/streamstash/statuses/{sha}","languages_url":"https://api.github.com/repos/yomashExpel/streamstash/languages","stargazers_url":"https://api.github.com/repos/yomashExpel/streamstash/stargazers","contributors_url":"https://api.github.com/repos/yomashExpel/streamstash/contributors","subscribers_url":"https://api.github.com/repos/yomashExpel/streamstash/subscribers","subscription_url":"https://api.github.com/repos/yomashExpel/streamstash/subscription","commits_url":"https://api.github.com/repos/yomashExpel/streamstash/commits{/sha}","git_commits_url":"https://api.github.com/repos/yomashExpel/streamstash/git/commits{/sha}","comments_url":"https://api.github.com/repos/yomashExpel/streamstash/comments{/number}","issue_comment_url":"https://api.github.com/repos/yomashExpel/streamstash/issues/comments{/number}","contents_url":"https://api.github.com/repos/yomashExpel/streamstash/contents/{+path}","compare_url":"https://api.github.com/repos/yomashExpel/streamstash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yomashExpel/streamstash/merges","archive_url":"https://api.github.com/repos/yomashExpel/streamstash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yomashExpel/streamstash/downloads","issues_url":"https://api.github.com/repos/yomashExpel/streamstash/issues{/number}","pulls_url":"https://api.github.com/repos/yomashExpel/streamstash/pulls{/number}","milestones_url":"https://api.github.com/repos/yomashExpel/streamstash/milestones{/number}","notifications_url":"https://api.github.com/repos/yomashExpel/streamstash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yomashExpel/streamstash/labels{/name}","releases_url":"https://api.github.com/repos/yomashExpel/streamstash/releases{/id}","deployments_url":"https://api.github.com/repos/yomashExpel/streamstash/deployments","created_at":"2017-03-09T20:56:53Z","updated_at":"2017-03-09T20:56:55Z","pushed_at":"2017-03-12T16:54:04Z","git_url":"git://github.com/yomashExpel/streamstash.git","ssh_url":"git@github.com:yomashExpel/streamstash.git","clone_url":"https://github.com/yomashExpel/streamstash.git","svn_url":"https://github.com/yomashExpel/streamstash","homepage":"","size":566,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"nbrownus:2.0","ref":"2.0","sha":"430d5680e4861ad83276215e6f394a02b5518826","user":{"login":"nbrownus","id":957319,"avatar_url":"https://avatars1.githubusercontent.com/u/957319?v=3","gravatar_id":"","url":"https://api.github.com/users/nbrownus","html_url":"https://github.com/nbrownus","followers_url":"https://api.github.com/users/nbrownus/followers","following_url":"https://api.github.com/users/nbrownus/following{/other_user}","gists_url":"https://api.github.com/users/nbrownus/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrownus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrownus/subscriptions","organizations_url":"https://api.github.com/users/nbrownus/orgs","repos_url":"https://api.github.com/users/nbrownus/repos","events_url":"https://api.github.com/users/nbrownus/events{/privacy}","received_events_url":"https://api.github.com/users/nbrownus/received_events","type":"User","site_admin":false},"repo":{"id":15598129,"name":"streamstash","full_name":"nbrownus/streamstash","owner":{"login":"nbrownus","id":957319,"avatar_url":"https://avatars1.githubusercontent.com/u/957319?v=3","gravatar_id":"","url":"https://api.github.com/users/nbrownus","html_url":"https://github.com/nbrownus","followers_url":"https://api.github.com/users/nbrownus/followers","following_url":"https://api.github.com/users/nbrownus/following{/other_user}","gists_url":"https://api.github.com/users/nbrownus/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrownus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrownus/subscriptions","organizations_url":"https://api.github.com/users/nbrownus/orgs","repos_url":"https://api.github.com/users/nbrownus/repos","events_url":"https://api.github.com/users/nbrownus/events{/privacy}","received_events_url":"https://api.github.com/users/nbrownus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nbrownus/streamstash","description":"Log aggregating, filtering, redirecting service","fork":false,"url":"https://api.github.com/repos/nbrownus/streamstash","forks_url":"https://api.github.com/repos/nbrownus/streamstash/forks","keys_url":"https://api.github.com/repos/nbrownus/streamstash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nbrownus/streamstash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nbrownus/streamstash/teams","hooks_url":"https://api.github.com/repos/nbrownus/streamstash/hooks","issue_events_url":"https://api.github.com/repos/nbrownus/streamstash/issues/events{/number}","events_url":"https://api.github.com/repos/nbrownus/streamstash/events","assignees_url":"https://api.github.com/repos/nbrownus/streamstash/assignees{/user}","branches_url":"https://api.github.com/repos/nbrownus/streamstash/branches{/branch}","tags_url":"https://api.github.com/repos/nbrownus/streamstash/tags","blobs_url":"https://api.github.com/repos/nbrownus/streamstash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nbrownus/streamstash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nbrownus/streamstash/git/refs{/sha}","trees_url":"https://api.github.com/repos/nbrownus/streamstash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nbrownus/streamstash/statuses/{sha}","languages_url":"https://api.github.com/repos/nbrownus/streamstash/languages","stargazers_url":"https://api.github.com/repos/nbrownus/streamstash/stargazers","contributors_url":"https://api.github.com/repos/nbrownus/streamstash/contributors","subscribers_url":"https://api.github.com/repos/nbrownus/streamstash/subscribers","subscription_url":"https://api.github.com/repos/nbrownus/streamstash/subscription","commits_url":"https://api.github.com/repos/nbrownus/streamstash/commits{/sha}","git_commits_url":"https://api.github.com/repos/nbrownus/streamstash/git/commits{/sha}","comments_url":"https://api.github.com/repos/nbrownus/streamstash/comments{/number}","issue_comment_url":"https://api.github.com/repos/nbrownus/streamstash/issues/comments{/number}","contents_url":"https://api.github.com/repos/nbrownus/streamstash/contents/{+path}","compare_url":"https://api.github.com/repos/nbrownus/streamstash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nbrownus/streamstash/merges","archive_url":"https://api.github.com/repos/nbrownus/streamstash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nbrownus/streamstash/downloads","issues_url":"https://api.github.com/repos/nbrownus/streamstash/issues{/number}","pulls_url":"https://api.github.com/repos/nbrownus/streamstash/pulls{/number}","milestones_url":"https://api.github.com/repos/nbrownus/streamstash/milestones{/number}","notifications_url":"https://api.github.com/repos/nbrownus/streamstash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nbrownus/streamstash/labels{/name}","releases_url":"https://api.github.com/repos/nbrownus/streamstash/releases{/id}","deployments_url":"https://api.github.com/repos/nbrownus/streamstash/deployments","created_at":"2014-01-03T01:21:26Z","updated_at":"2017-03-09T19:15:15Z","pushed_at":"2017-03-12T17:02:01Z","git_url":"git://github.com/nbrownus/streamstash.git","ssh_url":"git@github.com:nbrownus/streamstash.git","clone_url":"https://github.com/nbrownus/streamstash.git","svn_url":"https://github.com/nbrownus/streamstash","homepage":"","size":563,"stargazers_count":28,"watchers_count":28,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/9"},"html":{"href":"https://github.com/nbrownus/streamstash/pull/9"},"issue":{"href":"https://api.github.com/repos/nbrownus/streamstash/issues/9"},"comments":{"href":"https://api.github.com/repos/nbrownus/streamstash/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nbrownus/streamstash/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/nbrownus/streamstash/statuses/160633363698eafa42c14dbc17f3802519514323"}}}}
{"actor":{"display_login":"yomashExpel"}}