Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20210323.pdf
Search
nhjglgcm.,xdf
March 23, 2021
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20210323.pdf
nhjglgcm.,xdf
March 23, 2021
More Decks by nhjglgcm.,xdf
See All by nhjglgcm.,xdf
fork, vfork, posix_spawn
thiugfjdkvc
0
290
Delta Lake transaction log protocol
thiugfjdkvc
0
24
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
770
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Scaling GitHub
holman
464
140k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Paper Plane
katiecoart
PRO
2
53k
ラッコキーワード サービス紹介資料
rakko
1
4.8M
Transcript
EC2 / Fargate Logging
summary 現状の構成(EC2 + fluentd) から Fargate + α に移⾏するためのロギング構成を検討する
現状の構成 fluentdはEC2起動テンプレートのユーザーデータで設定&プロセス起動 アプリケーションからEBSにファイル出⼒ fluentdで拾って Firehose -> S3 へ。 Athenaでクエリ 起動テンプレートに依存しているためFargateに移⾏できない
MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==BOUNDARY==" --==BOUNDARY== Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash pip3 install awscli curl -L https://toolbelt.treasuredata.com/sh/install-amazon2-td-agent3.sh | sh td-agent-gem install fluent-plugin-s3 td-agent-gem install fluent-plugin-elasticsearch td-agent-gem install fluent-plugin-kinesis td-agent-gem install fluent-plugin-slack aws s3 cp s3://***/fluentd.conf /etc/td-agent/td-agent.conf chown -R td-agent /work/td-agent chown -R td-agent /etc/td-agent
Sidecar pattern
None
ログ出⼒⽅法 ファイル出⼒ 標準出⼒ FireLens
FireLens AWS⽤のfluentbitのイメージを利⽤する Docker build時に設定&ECRにpush FROM amazon/aws-for-fluent-bit:2.12.0 COPY ./extra.conf /fluent-bit/etc/extra.conf
ECS task 定義 { ... "containerDefinitions": [ { "dnsSearchDomains": null,
"environmentFiles": null, "logConfiguration": { "logDriver": "awsfirelens", "secretOptions": null, "options": { "Name": "" } }, ... "image": " メインアプリケーションのコンテナイメージ", ... }, { ... "image": "fluentbit のコンテナイメージ", "startTimeout": null, "firelensConfiguration": { "type": "fluentbit", "options": null }, ... } ], ... }
conclusion FireLens と fluentbit を⽤いた Sidecar pattern による EC2 /
Fargate のロギング構成を 紹介した