Skip to content

Commit

Permalink
feat: fluentbit dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
GIVEN53 committed Sep 29, 2023
1 parent 31e1f05 commit 944f1fa
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fluentbit/Dockerfile
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"]
39 changes: 39 additions & 0 deletions fluentbit/fluent-bit.conf
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}

0 comments on commit 944f1fa

Please sign in to comment.