-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM fluent/fluent-bit:2.1.9-arm64 | ||
|
||
COPY fluent-bit.conf /fluent-bit/etc/fluent-bit.conf | ||
|
||
ENV TZ=Asia/Seoul | ||
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] |
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,39 @@ | ||
[SERVICE] | ||
flush 5 | ||
grace 5 | ||
log_file /var/log/error.log | ||
|
||
[INPUT] | ||
name http | ||
listen 0.0.0.0 | ||
port 8888 | ||
tag app.log | ||
|
||
[INPUT] | ||
name http | ||
listen 0.0.0.0 | ||
port 8889 | ||
tag server.log | ||
|
||
[FILTER] | ||
Name modify | ||
Match * | ||
Add hostname ${HOSTNAME} | ||
|
||
[FILTER] | ||
name lua | ||
match * | ||
call append_time | ||
code function append_time(tag, timestamp, record) record["collected_at"] = os.date("%Y-%m-%dT%H:%M:%S%z", timestamp) return 1, timestamp, record end | ||
|
||
[OUTPUT] | ||
Name kinesis_streams | ||
Match app.log | ||
region ap-northeast-2 | ||
stream kn-client-log-${env} | ||
|
||
[OUTPUT] | ||
Name kinesis_streams | ||
Match server.log | ||
region ap-northeast-2 | ||
stream kn-server-log-${env} |