Skip to content

Commit

Permalink
Merge pull request #32 from guardian/aa/ecs-parser
Browse files Browse the repository at this point in the history
fix: Use custom parser to correctly process time field
  • Loading branch information
akash1810 committed Oct 16, 2023
2 parents 53f1a41 + 2a8fb05 commit 1153950
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions ecs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FROM amazon/aws-for-fluent-bit:latest
ADD parsers.conf /parsers.conf
ADD custom.conf /custom.conf
16 changes: 10 additions & 6 deletions ecs/custom.conf
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
[SERVICE]
Parsers_File /fluent-bit/parsers/parsers.conf
Parsers_File /parsers.conf

[FILTER]
Name modify
Match *
Add ShippedBy devx-logs-for-ecs
Add stack ${STACK}
Add stage ${STAGE}
Add app ${APP}
Add gu:repo ${GU_REPO}
Rename log message

[FILTER]
Name parser
Match *
Key_Name message
Parser json

[FILTER]
Name modify
Match *
Add ShippedBy devx-logs
Add stack ${STACK}
Add stage ${STAGE}
Add app ${APP}
Add gu:repo ${GU_REPO}
5 changes: 5 additions & 0 deletions ecs/parsers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[PARSER]
Name json
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%SZ

0 comments on commit 1153950

Please sign in to comment.