-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instruction and example to run dockerized awsbeats w/ Kinesis Dat…
…a Streams This should be enhanced to cover firehose and other beats. This is just a starting point :)
- Loading branch information
Showing
8 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ coverage.txt | |
vendor | ||
target | ||
.vagrant | ||
example/* | ||
example/firehose/log/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#filebeat.config: | ||
# prospectors: | ||
# path: ${path.config}/prospectors.d/*.yml | ||
# reload.enabled: false | ||
# modules: | ||
# path: ${path.config}/modules.d/*.yml | ||
# reload.enabled: false | ||
|
||
filebeat.prospectors: | ||
- input_type: log | ||
paths: | ||
- /mnt/log/*.log | ||
json.keys_under_root: true | ||
json.add_error_key: true | ||
|
||
processors: | ||
- add_cloud_metadata: | ||
|
||
output: | ||
streams: | ||
region: ap-northeast-1 | ||
stream_name: test1 | ||
partition_key: mykey | ||
|
||
queue.mem: | ||
events: 4096 | ||
flush.min_events: 5 | ||
flush.timeout: 3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf logs/* | ||
|
||
for stream in foo; do | ||
for i in $(seq 5); do | ||
echo ${stream}{i} >> ${stream}.log | ||
done | ||
done | ||
|
||
docker run \ | ||
--rm \ | ||
-v $(pwd)/logs:/mnt/log/ \ | ||
-v $(pwd)/filebeat.yml:/etc/filebeat/filebeat.yml \ | ||
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ | ||
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ | ||
s12v/awsbeats:canary \ | ||
filebeat \ | ||
--plugin kinesis.so \ | ||
-e \ | ||
-d='*' \ | ||
-c /etc/filebeat/filebeat.yml \ | ||
--strict.perms=false | ||
|
||
# Note that `strict.perms` seems to be required due to https://discuss.elastic.co/t/volume-mapped-filebeat-yml-permissions-from-docker-on-windows-host/91893/2 | ||
|
||
# In another terminal, emit some log messages: | ||
# | ||
# for i in $(seq 5); do echo '{"mykey":"foo'${i}'"}' >> logs/foo.log; done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
for i in $(seq 5); do | ||
echo '{"mykey":"mykey4","myvalue":"'$i'"}' | tee -a logs/foo.log | ||
done |