Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECS] [request]: Full Support for Running Fluent Bit as Daemon Service to collect all logs on an EC2 node #1876

Open
PettitWesley opened this issue Oct 31, 2022 · 2 comments
Labels
Proposed Community submitted issue

Comments

@PettitWesley
Copy link
Collaborator

PettitWesley commented Oct 31, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request

Support AWS for Fluent Bit running as a daemon service on ECS EC2, which means:

  1. Easily support injecting task metadata into logs: [ECS] [AWS for Fluent Bit]: Support ECS Task metadata injection when running Fluent Bit as a Daemon Service #1442
  2. Support templating log group/log stream names so that they can be customized based on metadata (already implemented): https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch#log-stream-and-group-name-templating-using-record_accessor-syntax
  3. Support on BOTH on Windows and Linux

Why support Fluent Bit as a Daemon in ECS EC2 when we already have FireLens?

Currently, ECS EC2 only supports a sidecar architecture for Fluent Bit with FireLens. This is in contrast to EKS EC2 where a daemon deployment of Fluent Bit is the standard. Some customers would prefer a daemon service for the following major reasons:

  1. A single daemon for all tasks on an EC2 host should in general use less CPU and memory total than a sidecar for every task.
  2. A daemon can easily use file system buffering since it can mount a host path to store the file buffer. Sidecars can not easily use file system buffers because when a task is restarted the buffer will be lost, and since many tasks with the same task definition may be scheduled on a single host, they can not all use the same host path to store their file buffers as their would be conflicts.
  3. Daemons can be restarted and re-configured independently of the tasks they serve. Since the Daemon will primarily read log files (and Fluent Bit will store its file offset in a local DB), when the Daemon is restarted it can pick up where it left off. So the log agent can be restarted without log loss.

Which service(s) is this request for?
ECS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.

@PettitWesley
Copy link
Collaborator Author

Once launched, this repo should be updated or archived: aws-samples/amazon-ecs-fluent-bit-daemon-service#3

@romankydybets
Copy link

is there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposed Community submitted issue
Projects
None yet
Development

No branches or pull requests

2 participants