{"action":"created","comment":{"url":"https://api.github.com/repos/pravega/pravega-samples/pulls/comments/191858581","pull_request_review_id":124515161,"id":191858581,"diff_hunk":"@@ -0,0 +1,133 @@\n+# High Count Alert #\n+\n+The application reads apache access logs from a Pravega stream and once every 2 seconds\n+counts the number of 500 responses in the last 30 seconds, and generates\n+alert when the counts of 500 responses exceed 6.\n+\n+## Prerequistes ##\n+\n+A Docker image containing Pravega and Logstash had been prepared to simplify the demo. Skip ahead to the **Run in Docker Container** section in this document if you have docker environment handy.\n+\n+Otherwise proceed to set up Logstash and Pravega\n+\n+1. Logstash installed, see [Install logstash](https://www.elastic.co/guide/en/logstash/5.6/installing-logstash.html).\n+2. Pravega running, see [here](http://pravega.io/docs/latest/getting-started/) for instructions.\n+\n+## Start Logstash with Pravega Output Plugin ##\n+\n+On the Logstash host, download the plugin gem file from [Logstash Pravega output plugin](https://github.com/pravega/logstash-output-pravega/releases), for example, `logstash-output-pravega-0.2.0.gem`.\n+\n+Install the plugin, assuming Logstash is installed at `/usr/share/logstash/`\n+```\n+$ /usr/share/logstash/bin/logstash-plugin install logstash-output-pravega-0.2.0.gem\n+```\n+\n+Copy the contents under flink-examples/doc/flink-high-error-count-alert/filters/ to the Logstash host, e.g., in directory ~/pravega.\n+update **pravega_endpoint** in ~/pravega/90-pravega-output.conf\n+\n+```\n+output {\n+    pravega {\n+        pravega_endpoint => \"tcp://127.0.0.1:9090\"   <- update to point to your Pravega controller\n+        stream_name => \"apacheaccess\"\n+        scope => \"examples\"\n+    }\n+}\n+```\n+\n+Start logstash, assuming it is installed at /usr/share/logstash/bin.\n+Note that sometimes it may take a minute or two for logstash to start. For troubleshooting, the logstash log files are \n+normally at /var/log/logstash. To restart, type Ctrl-C, then re-run the command.\n+\n+```\n+$ sudo /usr/share/logstash/bin -f ~/pravega\n+Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties\n+```\n+\n+Normally Logstash is configured to receive data from remote log shippers, such as filebeat. For simplicity in this demo\n+Logstash is configured read data from /tmp/access.log.\n+\n+## Run in Docker Container ##\n+\n+Create a file at /tmp/access.log\n+```\n+$ touch /tmp/access.log\n+```\n+\n+Run script below to start container from prebuilt image. Adjust parameters to your need.\n+```\n+#!/bin/sh\n+set -u\n+\n+PRAVEGA_SCOPE=myscope\n+PRAVEGA_STREAM=apacheaccess\n+CONTAINER_NAME=pravega\n+IMAGE_NAME=emccorp/pravega-demo","path":"flink-examples/doc/flink-high-error-count-alert/README.md","position":65,"original_position":65,"commit_id":"78165e3ad312d65438eae219e81de1d523668e2e","original_commit_id":"78165e3ad312d65438eae219e81de1d523668e2e","user":{"login":"vijikarthi","id":5560671,"avatar_url":"https://avatars1.githubusercontent.com/u/5560671?v=4","gravatar_id":"","url":"https://api.github.com/users/vijikarthi","html_url":"https://github.com/vijikarthi","followers_url":"https://api.github.com/users/vijikarthi/followers","following_url":"https://api.github.com/users/vijikarthi/following{/other_user}","gists_url":"https://api.github.com/users/vijikarthi/gists{/gist_id}","starred_url":"https://api.github.com/users/vijikarthi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijikarthi/subscriptions","organizations_url":"https://api.github.com/users/vijikarthi/orgs","repos_url":"https://api.github.com/users/vijikarthi/repos","events_url":"https://api.github.com/users/vijikarthi/events{/privacy}","received_events_url":"https://api.github.com/users/vijikarthi/received_events","type":"User","site_admin":false},"body":"As I understand the docker image is provided for convenience which bundles and run Pravega and LogStash with the supported Pravega LogStash plugin embedded. \r\n1) Currently the dockerfile and the scripts are managed in your personal repo. I think we need to move this to `pravega-samples` so that it's being part of the same repo from where we run the example\r\n2) I am not sure if `emccorp` namespace is the authorized docker repo namespace we could use? It's okay for the user to build the Docker image locally and use it (as the Pravega and LogStash plugins will be different for different release).\r\n3) The docker image build step could fetch the appropriate Pravega and Logstash plugin version from gradle.properties as this will make sure that the example code will guarantee to work with the tested Pravega veersion?  ","created_at":"2018-05-30T17:40:43Z","updated_at":"2018-05-30T17:40:43Z","html_url":"https://github.com/pravega/pravega-samples/pull/64#discussion_r191858581","pull_request_url":"https://api.github.com/repos/pravega/pravega-samples/pulls/64","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/comments/191858581"},"html":{"href":"https://github.com/pravega/pravega-samples/pull/64#discussion_r191858581"},"pull_request":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/pravega/pravega-samples/pulls/64","id":178083773,"html_url":"https://github.com/pravega/pravega-samples/pull/64","diff_url":"https://github.com/pravega/pravega-samples/pull/64.diff","patch_url":"https://github.com/pravega/pravega-samples/pull/64.patch","issue_url":"https://api.github.com/repos/pravega/pravega-samples/issues/64","number":64,"state":"open","locked":false,"title":"[issue 63] Flink alert sample","user":{"login":"hldnova","id":11613034,"avatar_url":"https://avatars2.githubusercontent.com/u/11613034?v=4","gravatar_id":"","url":"https://api.github.com/users/hldnova","html_url":"https://github.com/hldnova","followers_url":"https://api.github.com/users/hldnova/followers","following_url":"https://api.github.com/users/hldnova/following{/other_user}","gists_url":"https://api.github.com/users/hldnova/gists{/gist_id}","starred_url":"https://api.github.com/users/hldnova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hldnova/subscriptions","organizations_url":"https://api.github.com/users/hldnova/orgs","repos_url":"https://api.github.com/users/hldnova/repos","events_url":"https://api.github.com/users/hldnova/events{/privacy}","received_events_url":"https://api.github.com/users/hldnova/received_events","type":"User","site_admin":false},"body":"fixes #63 ","created_at":"2018-03-28T15:50:16Z","updated_at":"2018-05-30T17:40:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7263bbeac95d157e34fb21ee62d05f58d743c6b1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"EronWright","id":1775518,"avatar_url":"https://avatars0.githubusercontent.com/u/1775518?v=4","gravatar_id":"","url":"https://api.github.com/users/EronWright","html_url":"https://github.com/EronWright","followers_url":"https://api.github.com/users/EronWright/followers","following_url":"https://api.github.com/users/EronWright/following{/other_user}","gists_url":"https://api.github.com/users/EronWright/gists{/gist_id}","starred_url":"https://api.github.com/users/EronWright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EronWright/subscriptions","organizations_url":"https://api.github.com/users/EronWright/orgs","repos_url":"https://api.github.com/users/EronWright/repos","events_url":"https://api.github.com/users/EronWright/events{/privacy}","received_events_url":"https://api.github.com/users/EronWright/received_events","type":"User","site_admin":false},{"login":"kvandra","id":5042709,"avatar_url":"https://avatars3.githubusercontent.com/u/5042709?v=4","gravatar_id":"","url":"https://api.github.com/users/kvandra","html_url":"https://github.com/kvandra","followers_url":"https://api.github.com/users/kvandra/followers","following_url":"https://api.github.com/users/kvandra/following{/other_user}","gists_url":"https://api.github.com/users/kvandra/gists{/gist_id}","starred_url":"https://api.github.com/users/kvandra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvandra/subscriptions","organizations_url":"https://api.github.com/users/kvandra/orgs","repos_url":"https://api.github.com/users/kvandra/repos","events_url":"https://api.github.com/users/kvandra/events{/privacy}","received_events_url":"https://api.github.com/users/kvandra/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pravega/pravega-samples/pulls/64/commits","review_comments_url":"https://api.github.com/repos/pravega/pravega-samples/pulls/64/comments","review_comment_url":"https://api.github.com/repos/pravega/pravega-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pravega/pravega-samples/issues/64/comments","statuses_url":"https://api.github.com/repos/pravega/pravega-samples/statuses/78165e3ad312d65438eae219e81de1d523668e2e","head":{"label":"pravega:flinkalert-63","ref":"flinkalert-63","sha":"78165e3ad312d65438eae219e81de1d523668e2e","user":{"login":"pravega","id":25698199,"avatar_url":"https://avatars1.githubusercontent.com/u/25698199?v=4","gravatar_id":"","url":"https://api.github.com/users/pravega","html_url":"https://github.com/pravega","followers_url":"https://api.github.com/users/pravega/followers","following_url":"https://api.github.com/users/pravega/following{/other_user}","gists_url":"https://api.github.com/users/pravega/gists{/gist_id}","starred_url":"https://api.github.com/users/pravega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravega/subscriptions","organizations_url":"https://api.github.com/users/pravega/orgs","repos_url":"https://api.github.com/users/pravega/repos","events_url":"https://api.github.com/users/pravega/events{/privacy}","received_events_url":"https://api.github.com/users/pravega/received_events","type":"Organization","site_admin":false},"repo":{"id":82957400,"name":"pravega-samples","full_name":"pravega/pravega-samples","owner":{"login":"pravega","id":25698199,"avatar_url":"https://avatars1.githubusercontent.com/u/25698199?v=4","gravatar_id":"","url":"https://api.github.com/users/pravega","html_url":"https://github.com/pravega","followers_url":"https://api.github.com/users/pravega/followers","following_url":"https://api.github.com/users/pravega/following{/other_user}","gists_url":"https://api.github.com/users/pravega/gists{/gist_id}","starred_url":"https://api.github.com/users/pravega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravega/subscriptions","organizations_url":"https://api.github.com/users/pravega/orgs","repos_url":"https://api.github.com/users/pravega/repos","events_url":"https://api.github.com/users/pravega/events{/privacy}","received_events_url":"https://api.github.com/users/pravega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pravega/pravega-samples","description":"Sample Applications for Pravega. ","fork":false,"url":"https://api.github.com/repos/pravega/pravega-samples","forks_url":"https://api.github.com/repos/pravega/pravega-samples/forks","keys_url":"https://api.github.com/repos/pravega/pravega-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pravega/pravega-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pravega/pravega-samples/teams","hooks_url":"https://api.github.com/repos/pravega/pravega-samples/hooks","issue_events_url":"https://api.github.com/repos/pravega/pravega-samples/issues/events{/number}","events_url":"https://api.github.com/repos/pravega/pravega-samples/events","assignees_url":"https://api.github.com/repos/pravega/pravega-samples/assignees{/user}","branches_url":"https://api.github.com/repos/pravega/pravega-samples/branches{/branch}","tags_url":"https://api.github.com/repos/pravega/pravega-samples/tags","blobs_url":"https://api.github.com/repos/pravega/pravega-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pravega/pravega-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pravega/pravega-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/pravega/pravega-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pravega/pravega-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/pravega/pravega-samples/languages","stargazers_url":"https://api.github.com/repos/pravega/pravega-samples/stargazers","contributors_url":"https://api.github.com/repos/pravega/pravega-samples/contributors","subscribers_url":"https://api.github.com/repos/pravega/pravega-samples/subscribers","subscription_url":"https://api.github.com/repos/pravega/pravega-samples/subscription","commits_url":"https://api.github.com/repos/pravega/pravega-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/pravega/pravega-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/pravega/pravega-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/pravega/pravega-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/pravega/pravega-samples/contents/{+path}","compare_url":"https://api.github.com/repos/pravega/pravega-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pravega/pravega-samples/merges","archive_url":"https://api.github.com/repos/pravega/pravega-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pravega/pravega-samples/downloads","issues_url":"https://api.github.com/repos/pravega/pravega-samples/issues{/number}","pulls_url":"https://api.github.com/repos/pravega/pravega-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/pravega/pravega-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/pravega/pravega-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pravega/pravega-samples/labels{/name}","releases_url":"https://api.github.com/repos/pravega/pravega-samples/releases{/id}","deployments_url":"https://api.github.com/repos/pravega/pravega-samples/deployments","created_at":"2017-02-23T18:17:08Z","updated_at":"2018-05-28T09:43:10Z","pushed_at":"2018-05-30T14:52:35Z","git_url":"git://github.com/pravega/pravega-samples.git","ssh_url":"git@github.com:pravega/pravega-samples.git","clone_url":"https://github.com/pravega/pravega-samples.git","svn_url":"https://github.com/pravega/pravega-samples","homepage":"","size":944,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":11,"open_issues":20,"watchers":12,"default_branch":"master"}},"base":{"label":"pravega:develop","ref":"develop","sha":"3ebbec44ac4c1cdf0a971c8a952c3ad1f9b1e076","user":{"login":"pravega","id":25698199,"avatar_url":"https://avatars1.githubusercontent.com/u/25698199?v=4","gravatar_id":"","url":"https://api.github.com/users/pravega","html_url":"https://github.com/pravega","followers_url":"https://api.github.com/users/pravega/followers","following_url":"https://api.github.com/users/pravega/following{/other_user}","gists_url":"https://api.github.com/users/pravega/gists{/gist_id}","starred_url":"https://api.github.com/users/pravega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravega/subscriptions","organizations_url":"https://api.github.com/users/pravega/orgs","repos_url":"https://api.github.com/users/pravega/repos","events_url":"https://api.github.com/users/pravega/events{/privacy}","received_events_url":"https://api.github.com/users/pravega/received_events","type":"Organization","site_admin":false},"repo":{"id":82957400,"name":"pravega-samples","full_name":"pravega/pravega-samples","owner":{"login":"pravega","id":25698199,"avatar_url":"https://avatars1.githubusercontent.com/u/25698199?v=4","gravatar_id":"","url":"https://api.github.com/users/pravega","html_url":"https://github.com/pravega","followers_url":"https://api.github.com/users/pravega/followers","following_url":"https://api.github.com/users/pravega/following{/other_user}","gists_url":"https://api.github.com/users/pravega/gists{/gist_id}","starred_url":"https://api.github.com/users/pravega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravega/subscriptions","organizations_url":"https://api.github.com/users/pravega/orgs","repos_url":"https://api.github.com/users/pravega/repos","events_url":"https://api.github.com/users/pravega/events{/privacy}","received_events_url":"https://api.github.com/users/pravega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pravega/pravega-samples","description":"Sample Applications for Pravega. ","fork":false,"url":"https://api.github.com/repos/pravega/pravega-samples","forks_url":"https://api.github.com/repos/pravega/pravega-samples/forks","keys_url":"https://api.github.com/repos/pravega/pravega-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pravega/pravega-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pravega/pravega-samples/teams","hooks_url":"https://api.github.com/repos/pravega/pravega-samples/hooks","issue_events_url":"https://api.github.com/repos/pravega/pravega-samples/issues/events{/number}","events_url":"https://api.github.com/repos/pravega/pravega-samples/events","assignees_url":"https://api.github.com/repos/pravega/pravega-samples/assignees{/user}","branches_url":"https://api.github.com/repos/pravega/pravega-samples/branches{/branch}","tags_url":"https://api.github.com/repos/pravega/pravega-samples/tags","blobs_url":"https://api.github.com/repos/pravega/pravega-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pravega/pravega-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pravega/pravega-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/pravega/pravega-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pravega/pravega-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/pravega/pravega-samples/languages","stargazers_url":"https://api.github.com/repos/pravega/pravega-samples/stargazers","contributors_url":"https://api.github.com/repos/pravega/pravega-samples/contributors","subscribers_url":"https://api.github.com/repos/pravega/pravega-samples/subscribers","subscription_url":"https://api.github.com/repos/pravega/pravega-samples/subscription","commits_url":"https://api.github.com/repos/pravega/pravega-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/pravega/pravega-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/pravega/pravega-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/pravega/pravega-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/pravega/pravega-samples/contents/{+path}","compare_url":"https://api.github.com/repos/pravega/pravega-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pravega/pravega-samples/merges","archive_url":"https://api.github.com/repos/pravega/pravega-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pravega/pravega-samples/downloads","issues_url":"https://api.github.com/repos/pravega/pravega-samples/issues{/number}","pulls_url":"https://api.github.com/repos/pravega/pravega-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/pravega/pravega-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/pravega/pravega-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pravega/pravega-samples/labels{/name}","releases_url":"https://api.github.com/repos/pravega/pravega-samples/releases{/id}","deployments_url":"https://api.github.com/repos/pravega/pravega-samples/deployments","created_at":"2017-02-23T18:17:08Z","updated_at":"2018-05-28T09:43:10Z","pushed_at":"2018-05-30T14:52:35Z","git_url":"git://github.com/pravega/pravega-samples.git","ssh_url":"git@github.com:pravega/pravega-samples.git","clone_url":"https://github.com/pravega/pravega-samples.git","svn_url":"https://github.com/pravega/pravega-samples","homepage":"","size":944,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":11,"open_issues":20,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/64"},"html":{"href":"https://github.com/pravega/pravega-samples/pull/64"},"issue":{"href":"https://api.github.com/repos/pravega/pravega-samples/issues/64"},"comments":{"href":"https://api.github.com/repos/pravega/pravega-samples/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pravega/pravega-samples/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/pravega/pravega-samples/statuses/78165e3ad312d65438eae219e81de1d523668e2e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"vijikarthi"}}